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 3 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
15 changes: 8 additions & 7 deletions code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@
#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 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
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved

#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.
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
14 changes: 14 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,17 @@
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 = "Переключить разрешение выводить вас из раунда"
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
description = "Переключает разрешение другим игрокам выводить вас из раунда без соответствующей цели."
preftoggle_bitflag = PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE
preftoggle_toggle = PREFTOGGLE_TOGGLE2
preftoggle_category = PREFTOGGLE_CATEGORY_GENERAL
enable_message = "Другие игроки теперь имеют право выводить вас из раунда без цели."
disable_message = "Другие игроки больше не имеют права выводить вас из раунда без цели."
blackbox_message = "Переключение разрешения выводить игрока из раунда"

/datum/preference_toggle/toggle_take_out_of_the_round_without_obj/set_toggles(client/user)
. = ..()
log_admin("[user.ckey] " + (user.prefs.toggles2 & PREFTOGGLE_2_GIB_WITHOUT_OBJECTIVE ? "enabled" : "disabled") + " permission to take him/her out of the round.")
Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
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) // 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>"

Anorak2024 marked this conversation as resolved.
Show resolved Hide resolved
. = list(msg)
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)

Expand Down