Merge pull request #34025 from DaxDupont/PDAColor

PDA Interface color is now a preference.
This commit is contained in:
oranges
2018-01-04 16:11:57 +13:00
committed by CitadelStationBot
parent fb555e5680
commit a227ddf3c1
3 changed files with 18 additions and 6 deletions

View File

@@ -45,6 +45,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/allow_midround_antag = 1
var/preferred_map = null
var/pda_style = MONO
var/pda_color = "#808000"
var/uses_glasses_colour = 0
@@ -294,7 +295,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Keybindings:</b> <a href='?_src_=prefs;preference=hotkeys'>[(hotkeys) ? "Hotkeys" : "Default"]</a><br>"
dat += "<b>Action Buttons:</b> <a href='?_src_=prefs;preference=action_buttons'>[(buttons_locked) ? "Locked In Place" : "Unlocked"]</a><br>"
dat += "<b>tgui Style:</b> <a href='?_src_=prefs;preference=tgui_fancy'>[(tgui_fancy) ? "Fancy" : "No Frills"]</a><br>"
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=PDA'>[pda_style]</a><br>"
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=pda_style'>[pda_style]</a><br>"
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
dat += "<b>tgui Monitors:</b> <a href='?_src_=prefs;preference=tgui_lock'>[(tgui_lock) ? "Primary" : "All"]</a><br>"
dat += "<b>Window Flashing:</b> <a href='?_src_=prefs;preference=winflash'>[(windowflashing) ? "Yes" : "No"]</a><br>"
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'>[(toggles & SOUND_MIDI) ? "Yes" : "No"]</a><br>"
@@ -1296,10 +1298,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork")
if(pickedui)
UI_style = pickedui
if("PDA")
var/pickedPDA = input(user, "Choose your PDA style.", "Character Preference") as null|anything in list(MONO, SHARE, ORBITRON, VT)
if(pickedPDA)
pda_style = pickedPDA
if("pda_style")
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference") as null|anything in list(MONO, SHARE, ORBITRON, VT)
if(pickedPDAStyle)
pda_style = pickedPDAStyle
if("pda_color")
var/pickedPDAColor = input(user, "Choose your PDA Interface color.", "Character Preference") as null|color
if(pickedPDAColor)
pda_color = pickedPDAColor
//citadel code
if("cock_color")

View File

@@ -141,6 +141,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["has_womb"] = sanitize_integer(features["has_womb"], 0, 1, 0)
if(current_version < 19)
pda_style = "mono"
if(current_version < 20)
pda_color = "#808000"
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
@@ -196,6 +198,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["screenshake"] >> screenshake
S["damagescreenshake"] >> damagescreenshake
S["pda_style"] >> pda_style
S["pda_color"] >> pda_color
//try to fix any outdated data if necessary
if(needs_update >= 0)
@@ -223,6 +226,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
screenshake = sanitize_integer(screenshake, 0, 200, initial(screenshake))
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
pda_style = sanitize_inlist(MONO, VT, SHARE, ORBITRON)
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
return 1
@@ -267,6 +271,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["damagescreenshake"], damagescreenshake)
WRITE_FILE(S["arousable"], arousable)
WRITE_FILE(S["pda_style"], pda_style)
WRITE_FILE(S["pda_color"], pda_color)
return 1