Makes the pda font a prefernce
This commit is contained in:
committed by
CitadelStationBot
parent
2d27df3adc
commit
63aa1c7153
@@ -288,6 +288,12 @@ GLOBAL_LIST_INIT(ghost_accs_options, list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST
|
||||
|
||||
GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING)) //Same as ghost_accs_options.
|
||||
|
||||
//pda fonts
|
||||
#define MONO "Monospaced"
|
||||
#define VT "VT323"
|
||||
#define ORBITRON "Orbitron"
|
||||
#define SHARE "Share Tech Mono"
|
||||
|
||||
//Color Defines
|
||||
#define OOC_COLOR "#002eb8"
|
||||
|
||||
|
||||
@@ -27,13 +27,17 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
|
||||
var/icon_alert = "pda-r" //Icon to be overlayed for message alerts. Taken from the pda icon file.
|
||||
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
|
||||
var/font_mode = "font-family:\"VT323\", monospace;letter-spacing:1px;" //The currently selected font.
|
||||
var/font_mode = "font-family:monospace;" //The currently selected font.
|
||||
var/background_color = "#808000" //The currently selected background color.
|
||||
|
||||
#define FONT_VT 0
|
||||
#define FONT_SHARE 1
|
||||
#define FONT_ORBITRON 2
|
||||
#define FONT_MONO 3
|
||||
#define FONT_MONO "font-family:monospace;"
|
||||
#define FONT_SHARE "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;"
|
||||
#define FONT_ORBITRON "font-family:\"Orbitron\", monospace;letter-spacing:0px; font-size:15px"
|
||||
#define FONT_VT "font-family:\"VT323\", monospace;letter-spacing:1px;"
|
||||
#define MODE_MONO 0
|
||||
#define MODE_SHARE 1
|
||||
#define MODE_ORBITRON 2
|
||||
#define MODE_VT 3
|
||||
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
@@ -54,6 +58,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/detonatable = TRUE // Can the PDA be blown up?
|
||||
var/hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/emped = 0
|
||||
var/equipped = FALSE //used here to determine if this is the first time its been picked up
|
||||
|
||||
var/obj/item/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
|
||||
var/ownjob = null //related to above
|
||||
@@ -87,6 +92,27 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
inserted_item = new /obj/item/pen(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/pda/equipped(mob/user, slot)
|
||||
if(!equipped)
|
||||
if(user.client)
|
||||
switch(user.client.prefs.pda_style)
|
||||
if(MONO)
|
||||
font_index = MODE_MONO
|
||||
font_mode = FONT_MONO
|
||||
if(SHARE)
|
||||
font_index = MODE_SHARE
|
||||
font_mode = FONT_SHARE
|
||||
if(ORBITRON)
|
||||
font_index = MODE_ORBITRON
|
||||
font_mode = FONT_ORBITRON
|
||||
if(VT)
|
||||
font_index = MODE_VT
|
||||
font_mode = FONT_VT
|
||||
else
|
||||
font_index = MODE_MONO
|
||||
font_mode = FONT_MONO
|
||||
equipped = TRUE
|
||||
|
||||
/obj/item/device/pda/proc/update_label()
|
||||
name = "PDA-[owner] ([ownjob])" //Name generalisation
|
||||
|
||||
@@ -335,14 +361,14 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
font_index = (font_index + 1) % 4
|
||||
|
||||
switch(font_index)
|
||||
if (FONT_VT)
|
||||
font_mode = "font-family:\"VT323\", monospace;letter-spacing:1px;"
|
||||
if (FONT_SHARE)
|
||||
font_mode = "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;"
|
||||
if (FONT_ORBITRON)
|
||||
font_mode = "font-family:\"Orbitron\", monospace;letter-spacing:0px; font-size:15px"
|
||||
if (FONT_MONO)
|
||||
font_mode = "font-family:monospace;"
|
||||
if (MODE_MONO)
|
||||
font_mode = FONT_MONO
|
||||
if (MODE_SHARE)
|
||||
font_mode = FONT_SHARE
|
||||
if (MODE_ORBITRON)
|
||||
font_mode = FONT_ORBITRON
|
||||
if (MODE_VT)
|
||||
font_mode = FONT_VT
|
||||
if ("Change_Color")
|
||||
var/new_color = input("Please enter a color name or hex value (Default is \'#808000\').")as color
|
||||
background_color = new_color
|
||||
|
||||
@@ -44,7 +44,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/inquisitive_ghost = 1
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
|
||||
var/pda_style = MONO
|
||||
|
||||
var/uses_glasses_colour = 0
|
||||
|
||||
var/screenshake = 100
|
||||
@@ -446,6 +447,7 @@ 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>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>"
|
||||
@@ -1449,6 +1451,10 @@ 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
|
||||
|
||||
//citadel code
|
||||
if("cock_color")
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#define SAVEFILE_VERSION_MIN 15
|
||||
|
||||
//This is the current version, anything below this will attempt to update (if it's not obsolete)
|
||||
<<<<<<< HEAD
|
||||
#define SAVEFILE_VERSION_MAX 20
|
||||
=======
|
||||
#define SAVEFILE_VERSION_MAX 19
|
||||
>>>>>>> f770b69... Makes the pda font a prefernce (#31193)
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
This proc checks if the current directory of the savefile S needs updating
|
||||
@@ -107,6 +111,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
joblessrole = BEASSISTANT
|
||||
if(current_version < 17)
|
||||
features["legs"] = "Normal Legs"
|
||||
<<<<<<< HEAD
|
||||
if(current_version < 20)//Raise this to the max savefile version every time we change something so we don't sanitize this whole list every time you save.
|
||||
features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], GLOB.mam_body_markings_list)
|
||||
features["mam_ears"] = sanitize_inlist(features["mam_ears"], GLOB.mam_ears_list)
|
||||
@@ -139,6 +144,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, 0)
|
||||
//womb features
|
||||
features["has_womb"] = sanitize_integer(features["has_womb"], 0, 1, 0)
|
||||
=======
|
||||
if(current_version < 19)
|
||||
pda_style = "mono"
|
||||
|
||||
>>>>>>> f770b69... Makes the pda font a prefernce (#31193)
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
@@ -187,12 +197,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["menuoptions"] >> menuoptions
|
||||
S["enable_tips"] >> enable_tips
|
||||
S["tip_delay"] >> tip_delay
|
||||
<<<<<<< HEAD
|
||||
S["parallax"] >> parallax
|
||||
S["menuoptions"] >> menuoptions
|
||||
//citadel code
|
||||
S["arousable"] >> arousable
|
||||
S["screenshake"] >> screenshake
|
||||
S["damagescreenshake"] >> damagescreenshake
|
||||
=======
|
||||
S["pda_style"] >> pda_style
|
||||
>>>>>>> f770b69... Makes the pda font a prefernce (#31193)
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
@@ -217,9 +231,13 @@ 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)
|
||||
<<<<<<< HEAD
|
||||
screenshake = sanitize_integer(screenshake, 0, 200, initial(screenshake))
|
||||
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
|
||||
|
||||
=======
|
||||
pda_style = sanitize_inlist(MONO, VT, SHARE, ORBITRON)
|
||||
>>>>>>> f770b69... Makes the pda font a prefernce (#31193)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -259,10 +277,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["menuoptions"], menuoptions)
|
||||
WRITE_FILE(S["enable_tips"], enable_tips)
|
||||
WRITE_FILE(S["tip_delay"], tip_delay)
|
||||
<<<<<<< HEAD
|
||||
//citadel code
|
||||
WRITE_FILE(S["screenshake"], screenshake)
|
||||
WRITE_FILE(S["damagescreenshake"], damagescreenshake)
|
||||
WRITE_FILE(S["arousable"], arousable)
|
||||
=======
|
||||
WRITE_FILE(S["pda_style"], pda_style)
|
||||
>>>>>>> f770b69... Makes the pda font a prefernce (#31193)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user