mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Minor ERT refactor, introduces a few ERT admin options (#56345)
This commit is contained in:
@@ -16,6 +16,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/ooccolor = "#c43b23"
|
||||
var/asaycolor = "#ff4500" //This won't change the color for current admins, only incoming ones.
|
||||
/// If we spawn an ERT as an admin and choose to spawn as the briefing officer, we'll be given this outfit
|
||||
var/brief_outfit = /datum/outfit/centcom/commander
|
||||
var/enable_tips = TRUE
|
||||
var/tip_delay = 500 //tip delay in milliseconds
|
||||
|
||||
@@ -733,6 +735,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Hide Radio Messages:</b> <a href = '?_src_=prefs;preference=toggle_radio_chatter'>[(chat_toggles & CHAT_RADIO)?"Shown":"Hidden"]</a><br>"
|
||||
dat += "<b>Hide Prayers:</b> <a href = '?_src_=prefs;preference=toggle_prayers'>[(chat_toggles & CHAT_PRAYER)?"Shown":"Hidden"]</a><br>"
|
||||
dat += "<b>Ignore Being Summoned as Cult Ghost:</b> <a href = '?_src_=prefs;preference=toggle_ignore_cult_ghost'>[(toggles & ADMIN_IGNORE_CULT_GHOST)?"Don't Allow Being Summoned":"Allow Being Summoned"]</a><br>"
|
||||
dat += "<b>Briefing Officer Outfit:</b> <a href = '?_src_=prefs;preference=briefoutfit;task=input'>[brief_outfit]</a><br>"
|
||||
if(CONFIG_GET(flag/allow_admin_asaycolor))
|
||||
dat += "<br>"
|
||||
dat += "<b>ASAY Color:</b> <span style='border: 1px solid #161616; background-color: [asaycolor ? asaycolor : "#FF4500"];'> </span> <a href='?_src_=prefs;preference=asaycolor;task=input'>Change</a><br>"
|
||||
@@ -1513,6 +1516,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_asaycolor)
|
||||
asaycolor = sanitize_ooccolor(new_asaycolor)
|
||||
|
||||
if("briefoutfit")
|
||||
var/list/valid_paths = list()
|
||||
for(var/datum/outfit/iter_outfit in subtypesof(/datum/outfit))
|
||||
if(initial(iter_outfit.can_be_admin_equipped))
|
||||
valid_paths[initial(iter_outfit.name)] = path
|
||||
var/new_outfit = input(user, "Choose your briefing officer outfit:", "Game Preference") as null|anything in valid_paths
|
||||
new_outfit = valid_paths[new_outfit]
|
||||
if(new_outfit)
|
||||
brief_outfit = new_outfit
|
||||
|
||||
if("bag")
|
||||
var/new_backpack = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backpacklist
|
||||
if(new_backpack)
|
||||
|
||||
@@ -159,6 +159,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//general preferences
|
||||
READ_FILE(S["asaycolor"], asaycolor)
|
||||
READ_FILE(S["brief_outfit"], brief_outfit)
|
||||
READ_FILE(S["ooccolor"], ooccolor)
|
||||
READ_FILE(S["lastchangelog"], lastchangelog)
|
||||
READ_FILE(S["UI_style"], UI_style)
|
||||
@@ -249,6 +250,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
menuoptions = SANITIZE_LIST(menuoptions)
|
||||
be_special = SANITIZE_LIST(be_special)
|
||||
brief_outfit = sanitize_inlist(brief_outfit, subtypesof(/datum/outfit), null)
|
||||
pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
|
||||
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
|
||||
key_bindings = sanitize_keybindings(key_bindings)
|
||||
@@ -285,6 +287,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//general preferences
|
||||
WRITE_FILE(S["asaycolor"], asaycolor)
|
||||
WRITE_FILE(S["brief_outfit"], brief_outfit)
|
||||
WRITE_FILE(S["ooccolor"], ooccolor)
|
||||
WRITE_FILE(S["lastchangelog"], lastchangelog)
|
||||
WRITE_FILE(S["UI_style"], UI_style)
|
||||
|
||||
Reference in New Issue
Block a user