Files
Bubberstation/code/modules/client/preferences/admin.dm
Jackraxxus 0ec9ab3a17 Adds a Config for Auto-Deadminning on Ready Up and Latejoining (#89522)
## About The Pull Request
Fixes #89458
Adds a config for auto-deadminning admins who ready up before the round
starts, or click join game after.
The deadminning happens as soon as the button is pressed, not when a job
is selected or the round starts. I figure it's better to do it straight
away since both have opportunities for metainfo to be posted in admin
chat. Before there's admins messing with dynamic config / plotting
events etc. and during the round there's basically everything that gets
posted to admin logs.

I've had to add a typecheck to the auto_deadmin proc, since the lobby
menu technically happens on the centcom Z-level, and there's a pref for
ignoring deadminning on centcom Z, so it checks to see if the admin is a
new player mob.

Changed the old config from auto_deadmin_player to auto_deadmin_always
to make it less deceptive.
Was suggested a pref could be added to do this. I can do that if people
want it maybe, but it's not in this PR at the time of posting it.

Is now a pref
<img src="https://i.ibb.co/211sBMYd/Deadmin-Prefs1.png">
<img src="https://i.ibb.co/r20Srbw4/Deadmin-Prefs2.png">

I dunno if the latejoin proccall is in the right spot in the click
sequence thing I can move it if people want.
## Why It's Good For The Game

Admins spawning themselves on station is very important for both
shenanigans and troubleshooting. It's annoying to have to click readmin
every time and I'm too lazy to figure out how to perms escalate my way
into disabling that config every round (Though I have tried).

This PR is marginally more likely to convince Timber to turn that off
than cussing him out in adminbus.
## Changelog
🆑
admin: Added a new config to force admins to deadmin when readying up or
latejoining the round.
/🆑
2025-02-21 18:54:05 +00:00

89 lines
2.9 KiB
Plaintext

/datum/preference/color/asay_color
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "asaycolor"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/color/asay_color/create_default_value()
return DEFAULT_ASAY_COLOR
/datum/preference/color/asay_color/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return is_admin(preferences.parent) && CONFIG_GET(flag/allow_admin_asaycolor)
/// What outfit to equip when spawning as a briefing officer for an ERT
/datum/preference/choiced/brief_outfit
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "brief_outfit"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/brief_outfit/deserialize(input, datum/preferences/preferences)
var/path = text2path(input)
if (!ispath(path, /datum/outfit))
return create_default_value()
return path
/datum/preference/choiced/brief_outfit/serialize(input)
return "[input]"
/datum/preference/choiced/brief_outfit/create_default_value()
return /datum/outfit/centcom/commander
/datum/preference/choiced/brief_outfit/init_possible_values()
return subtypesof(/datum/outfit)
/datum/preference/choiced/brief_outfit/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return is_admin(preferences.parent)
/datum/preference/toggle/bypass_deadmin_in_centcom
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "bypass_deadmin_in_centcom"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/bypass_deadmin_in_centcom/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return is_admin(preferences.parent)
/// When enabled, prevents any and all ghost role pop-ups WHILE ADMINNED.
/datum/preference/toggle/ghost_roles_as_admin
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "ghost_roles_as_admin"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/ghost_roles_as_admin/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return is_admin(preferences.parent)
/datum/preference/toggle/comms_notification
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "comms_notification"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/comms_notification/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return is_admin(preferences.parent)
/datum/preference/toggle/auto_deadmin_on_ready_or_latejoin
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "auto_deadmin_on_ready_or_latejoin"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/auto_deadmin_on_ready_or_latejoin/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
if (preferences.toggles & DEADMIN_ALWAYS) //No reason to show if they're deadminning always, because deadmin always also deadmins on ready / latejoin
return FALSE
return is_admin(preferences.parent)