Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: You can now set up preference for removing from round #6069

Merged
merged 9 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@
#define PREFTOGGLE_2_MC_TAB (1<<11) // 2048
#define PREFTOGGLE_2_DISABLE_TGUI_INPUT (1<<12) // 4096
#define PREFTOGGLE_2_PARALLAX_MULTIZ (1<<13) // 8192
#define PREFTOGGLE_2_DISABLE_VOTE_POPUPS (1<<14) // 16384
#define PREFTOGGLE_2_SWAP_INPUT_BUTTONS (1<<15) // 32768
#define PREFTOGGLE_2_LARGE_INPUT_BUTTONS (1<<16) // 65536
#define PREFTOGGLE_2_BIG_STRIP_MENU (1<<17) // 131072
#define PREFTOGGLE_2_ENABLE_TGUI_SAY_LIGHT_MODE (1<<18) // 262144
#define PREFTOGGLE_2_PIXELATED_MENU (1<<19) // 524288
#define PREFTOGGLE_2_DESC_TIPS (1<<20) // 1048576

#define TOGGLES_2_TOTAL 2097151 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
#define PREFTOGGLE_2_DISABLE_VOTE_POPUPS (1<<14) // 16384
#define PREFTOGGLE_2_SWAP_INPUT_BUTTONS (1<<15) // 32768
#define PREFTOGGLE_2_LARGE_INPUT_BUTTONS (1<<16) // 65536
#define PREFTOGGLE_2_BIG_STRIP_MENU (1<<17) // 131072
#define PREFTOGGLE_2_ENABLE_TGUI_SAY_LIGHT_MODE (1<<18) // 262144
#define PREFTOGGLE_2_PIXELATED_MENU (1<<19) // 524288
#define PREFTOGGLE_2_DESC_TIPS (1<<20) // 1048576
#define PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE (1<<21) // 2097152

#define TOGGLES_2_TOTAL 4194303 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.

#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_PARALLAX_MULTIZ|PREFTOGGLE_2_SWAP_INPUT_BUTTONS|PREFTOGGLE_2_LARGE_INPUT_BUTTONS|PREFTOGGLE_2_DESC_TIPS)

Expand Down
11 changes: 11 additions & 0 deletions code/modules/client/preference/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -590,3 +590,14 @@
enable_message = "You will see item description tips now."
disable_message = "You will not see item description tips now."
blackbox_message = "Toggle item description tips on hover"

/datum/preference_toggle/toggle_take_out_of_the_round_without_obj
name = "Вывод из игры без цели"
description = "Переключает разрешение другим игрокам выводить вас из раунда без соответствующей цели."
preftoggle_bitflag = PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE
preftoggle_toggle = PREFTOGGLE_TOGGLE2
preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
enable_message = "Другие игроки теперь имеют право выводить вас из раунда без цели."
disable_message = "Другие игроки больше не имеют права выводить вас из раунда без цели."
blackbox_message = "Переключение разрешения выводить игрока из раунда"

4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\n[p_they(TRUE)] [p_are()] [pose]"

if(client && mind && !mind.offstation_role && user.mind.special_role) // No ashwalkers, monkeys etc
var/permission_granted = client.prefs.toggles2 & PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE
msg += "\n<div class='examine'>[span_info("Вы[permission_granted ? "" : " [span_warning("НЕ")]"] можете вывести этого игрока из игры не имея соответствующей цели.")]</div>"

. = list(msg)
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)

Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
..()
INVOKE_ASYNC(src, PROC_REF(burst_blob_on_die))
timeofdeath = world.time
add_attack_logs(src, src, "died[gibbed ? " (Gibbed)": ""]")
var/gib_pref = ""
if(client)
gib_pref = " Разрешение на гиб без цели в" + (client.prefs.toggles2 & PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE ? "" : "ы") + "ключено."

add_attack_logs(src, src, "died[gibbed ? " (Gibbed)": ""]" + gib_pref)

if(!gibbed && deathgasp_on_death)
INVOKE_ASYNC(src, PROC_REF(emote), "deathgasp")
Expand Down