diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 01a0dbd5f88..32fb26a779e 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -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) diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index a17aa806114..2cef26fd5e9 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -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 = "Переключение разрешения выводить игрока из раунда" + diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 1cfac94b198..8a67c6024b7 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -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
[span_info("Вы[permission_granted ? "" : " [span_warning("НЕ")]"] можете вывести этого игрока из игры не имея соответствующей цели.")]
" + . = list(msg) SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index dc279a53871..dc484ceedcb 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -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")