ooc colour shenanigans (#15788)

This commit is contained in:
Lin
2022-08-20 08:41:20 +00:00
committed by GitHub
parent 3336390eb2
commit 4b21981547
3 changed files with 34 additions and 14 deletions
+2 -2
View File
@@ -2453,12 +2453,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("ooccolor")
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference",ooccolor) as color|null
if(new_ooccolor)
ooccolor = new_ooccolor
ooccolor = sanitize_ooccolor(new_ooccolor)
if("aooccolor")
var/new_aooccolor = input(user, "Choose your Antag OOC colour:", "Game Preference",ooccolor) as color|null
if(new_aooccolor)
aooccolor = new_aooccolor
aooccolor = sanitize_ooccolor(new_aooccolor)
if("bag")
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist
+29 -6
View File
@@ -108,16 +108,38 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
else
GLOB.dooc_allowed = !GLOB.dooc_allowed
/client/proc/set_ooc(newColor as color)
/client/proc/set_ooc()
set name = "Set Player OOC Color"
set desc = "Modifies player OOC Color"
set category = "Admin.Fun"
GLOB.OOC_COLOR = sanitize_ooccolor(newColor)
if(IsAdminAdvancedProcCall())
return
var/newColor = input(src, "Please select the new player OOC color.", "OOC color") as color|null
if(isnull(newColor))
return
if(!check_rights(R_FUN))
message_admins("[usr.key] has attempted to use the Set Player OOC Color verb!")
log_admin("[key_name(usr)] tried to set player ooc color without authorization.")
return
var/new_color = sanitize_ooccolor(newColor)
message_admins("[key_name_admin(usr)] has set the players' ooc color to [new_color].")
log_admin("[key_name_admin(usr)] has set the player ooc color to [new_color].")
GLOB.OOC_COLOR = new_color
/client/proc/reset_ooc()
set name = "Reset Player OOC Color"
set desc = "Returns player OOC Color to default"
set category = "Admin.Fun"
if(IsAdminAdvancedProcCall())
return
if(alert(usr, "Are you sure you want to reset the OOC color of all players?", "Reset Player OOC Color", "Yes", "No") != "Yes")
return
if(!check_rights(R_FUN))
message_admins("[usr.key] has attempted to use the Reset Player OOC Color verb!")
log_admin("[key_name(usr)] tried to reset player ooc color without authorization.")
return
message_admins("[key_name_admin(usr)] has reset the players' ooc color.")
log_admin("[key_name_admin(usr)] has reset player ooc color.")
GLOB.OOC_COLOR = null
/client/verb/colorooc() //this is admin and people who bought byond.
@@ -129,11 +151,12 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
return
var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
if(new_ooccolor)
prefs.ooccolor = sanitize_ooccolor(new_ooccolor)
prefs.save_preferences()
if(isnull(new_ooccolor))
return
new_ooccolor = sanitize_ooccolor(new_ooccolor)
prefs.ooccolor = new_ooccolor
prefs.save_preferences()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Set OOC Color") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/verb/resetcolorooc()
set name = "Reset Your OOC Color"