module things, jfc
This commit is contained in:
+260
-199
@@ -16,7 +16,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/max_save_slots = 3
|
||||
var/max_save_slots = 8
|
||||
|
||||
//non-preference stuff
|
||||
var/muted = 0
|
||||
@@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "moth_wings" = "Plain")
|
||||
|
||||
var/list/custom_names = list("human", "clown", "mime", "ai", "cyborg", "religion", "deity")
|
||||
var/list/custom_names = list()
|
||||
var/prefered_security_department = SEC_DEPT_RANDOM
|
||||
|
||||
//Mob preview
|
||||
@@ -109,9 +109,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
// 0 = character settings, 1 = game preferences
|
||||
var/current_tab = 0
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
var/unlock_content = 0
|
||||
|
||||
var/list/ignoring = list()
|
||||
@@ -132,11 +129,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["human"] = random_unique_name()
|
||||
custom_names["ai"] = pick(GLOB.ai_names)
|
||||
custom_names["cyborg"] = DEFAULT_CYBORG_NAME
|
||||
custom_names["clown"] = pick(GLOB.clown_names)
|
||||
custom_names["mime"] = pick(GLOB.mime_names)
|
||||
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
custom_names[custom_name_id] = get_default_name(custom_name_id)
|
||||
|
||||
UI_style = GLOB.available_ui_styles[1]
|
||||
if(istype(C))
|
||||
if(!IsGuestKey(C.key))
|
||||
@@ -157,6 +153,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
menuoptions = list()
|
||||
return
|
||||
|
||||
#define APPEARANCE_CATEGORY_COLUMN "<td valign='top' width='14%'>"
|
||||
#define MAX_MUTANT_ROWS 4
|
||||
|
||||
/datum/preferences/proc/ShowChoices(mob/user)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
@@ -165,13 +164,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
update_preview_icon(nude=FALSE) //EDIT END
|
||||
user << browse_rsc(preview_icon, "previewicon.png")
|
||||
var/dat = "<center>"
|
||||
var/list/dat = list("<center>")
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Character Settings</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=2' [current_tab == 2 ? "class='linkOn'" : ""]>Character Appearance</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=3' [current_tab == 3 ? "class='linkOn'" : ""]>Loadout</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
|
||||
|
||||
if(!path)
|
||||
dat += "<div class='notice'>Please create an account to save your preferences</div>"
|
||||
|
||||
@@ -186,7 +184,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(S)
|
||||
dat += "<center>"
|
||||
var/name
|
||||
var/unspaced_slots = 0
|
||||
for(var/i=1, i<=max_save_slots, i++)
|
||||
unspaced_slots++
|
||||
if(unspaced_slots > 4)
|
||||
dat += "<br>"
|
||||
unspaced_slots = 0
|
||||
S.cd = "/character[i]"
|
||||
S["real_name"] >> name
|
||||
if(!name)
|
||||
@@ -214,17 +217,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a><BR>"
|
||||
|
||||
dat += "<b>Special Names:</b><BR>"
|
||||
dat += "<a href ='?_src_=prefs;preference=human_name;task=input'><b>Backup Human Name:</b> [custom_names["human"]]</a> "
|
||||
var/old_group
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
var/namedata = GLOB.preferences_custom_names[custom_name_id]
|
||||
if(!old_group)
|
||||
old_group = namedata["group"]
|
||||
else if(old_group != namedata["group"])
|
||||
old_group = namedata["group"]
|
||||
dat += "<br>"
|
||||
dat += "<a href ='?_src_=prefs;preference=[custom_name_id];task=input'><b>[namedata["pref_name"]]:</b> [custom_names[custom_name_id]]</a> "
|
||||
dat += "<br>"
|
||||
dat += "<a href ='?_src_=prefs;preference=clown_name;task=input'><b>Clown:</b> [custom_names["clown"]]</a> "
|
||||
dat += "<a href ='?_src_=prefs;preference=mime_name;task=input'><b>Mime:</b> [custom_names["mime"]]</a>"
|
||||
dat += "<br>"
|
||||
dat += "<a href ='?_src_=prefs;preference=ai_name;task=input'><b>AI:</b> [custom_names["ai"]]</a> "
|
||||
dat += "<a href ='?_src_=prefs;preference=cyborg_name;task=input'><b>Cyborg:</b> [custom_names["cyborg"]]</a>"
|
||||
dat += "<br>"
|
||||
dat += "<a href ='?_src_=prefs;preference=religion_name;task=input'><b>Chaplain religion:</b> [custom_names["religion"]] </a>"
|
||||
dat += "<a href ='?_src_=prefs;preference=deity_name;task=input'><b>Chaplain deity:</b> [custom_names["deity"]]</a><BR>"
|
||||
|
||||
dat += "<b>Custom job preferences:</b><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=sec_dept;task=input'><b>Prefered security department:</b> [prefered_security_department]</a><BR></td>"
|
||||
|
||||
@@ -249,19 +251,43 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbag]</a><BR>"
|
||||
dat += "<b>Uplink Spawn Location:</b><BR><a href ='?_src_=prefs;preference=uplink_loc;task=input'>[uplink_spawn_loc]</a><BR></td>"
|
||||
|
||||
if(pref_species.use_skintones)
|
||||
var/use_skintones = pref_species.use_skintones
|
||||
if(use_skintones)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Skin Tone</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
|
||||
var/mutant_colors
|
||||
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
|
||||
|
||||
if(!use_skintones)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Mutant Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
|
||||
mutant_colors = TRUE
|
||||
|
||||
if((EYECOLOR in pref_species.species_traits) && !(NOEYES in pref_species.species_traits))
|
||||
|
||||
if(!use_skintones && !mutant_colors)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Eye Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'> </span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
else if(use_skintones || mutant_colors)
|
||||
dat += "</td>"
|
||||
|
||||
if(HAIR in pref_species.species_traits)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Hair Style</h3>"
|
||||
|
||||
@@ -269,9 +295,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<a href='?_src_=prefs;preference=previous_hair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_hair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'> </span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Facial Hair Style</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
|
||||
@@ -280,129 +303,157 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if((EYECOLOR in pref_species.species_traits) && !(NOEYES in pref_species.species_traits))
|
||||
//Mutant stuff
|
||||
var/mutant_category = 0
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Eye Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'> </span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
|
||||
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
|
||||
|
||||
dat += "<td valign='top' width='14%'>"
|
||||
|
||||
dat += "<h3>Mutant Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("tail_lizard" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("tail_lizard" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("snout" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("snout" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Snout</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("horns" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("horns" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Horns</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("frills" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("frills" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Frills</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("spines" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("spines" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Spines</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("body_markings" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("body_markings" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Body Markings</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
if("legs" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("legs" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Legs</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
if("moth_wings" in pref_species.mutant_bodyparts)
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("moth_wings" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Moth wings</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=moth_wings;task=input'>[features["moth_wings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("tail_human" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if("ears" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Ears</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
|
||||
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(CONFIG_GET(flag/join_with_mutant_humans))
|
||||
|
||||
if("tail_human" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("ears" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Ears</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
if("wings" in pref_species.default_features && GLOB.r_wings_list.len >1)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
|
||||
dat += "<h3>Wings</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
if(mutant_category)
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
dat += "</tr></table>"*/
|
||||
|
||||
|
||||
@@ -410,37 +461,24 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;task=input;preference=ui'>[UI_style]</a><br>"
|
||||
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_style'>[pda_style]</a><br>"
|
||||
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'> </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>"
|
||||
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'>[(toggles & SOUND_LOBBY) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'>[(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'>[(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost whispers:</b> <a href='?_src_=prefs;preference=ghost_whispers'>[(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost radio:</b> <a href='?_src_=prefs;preference=ghost_radio'>[(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Ghost pda:</b> <a href='?_src_=prefs;preference=ghost_pda'>[(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Pull requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]</a><br>"
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'>Edit </a><br>"
|
||||
dat += "<b>tgui Style:</b> <a href='?_src_=prefs;preference=tgui_fancy'>[(tgui_fancy) ? "Fancy" : "No Frills"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Action Buttons:</b> <a href='?_src_=prefs;preference=action_buttons'>[(buttons_locked) ? "Locked In Place" : "Unlocked"]</a><br>"
|
||||
dat += "<b>Keybindings:</b> <a href='?_src_=prefs;preference=hotkeys'>[(hotkeys) ? "Hotkeys" : "Default"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'> </span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
|
||||
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=pda_style'>[pda_style]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Ghost Ears:</b> <a href='?_src_=prefs;preference=ghost_ears'>[(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost Radio:</b> <a href='?_src_=prefs;preference=ghost_radio'>[(chat_toggles & CHAT_GHOSTRADIO) ? "All Messages":"No Messages"]</a><br>"
|
||||
dat += "<b>Ghost Sight:</b> <a href='?_src_=prefs;preference=ghost_sight'>[(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost Whispers:</b> <a href='?_src_=prefs;preference=ghost_whispers'>[(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Ghost PDA:</b> <a href='?_src_=prefs;preference=ghost_pda'>[(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]</a><br>"
|
||||
|
||||
if(user.client)
|
||||
if(user.client.holder)
|
||||
dat += "<b>Adminhelp Sound:</b> <a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"On":"Off"]</a><br>"
|
||||
dat += "<b>Announce Login:</b> <a href='?_src_=prefs;preference=announce_login'>[(toggles & ANNOUNCE_LOGIN)?"On":"Off"]</a><br>"
|
||||
|
||||
if(unlock_content || check_rights_for(user.client, R_ADMIN))
|
||||
dat += "<b>OOC:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
|
||||
if(unlock_content)
|
||||
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</a><br>"
|
||||
dat += "<b>Ghost Form:</b> <a href='?_src_=prefs;task=input;preference=ghostform'>[ghost_form]</a><br>"
|
||||
dat += "<B>Ghost Orbit: </B> <a href='?_src_=prefs;task=input;preference=ghostorbit'>[ghost_orbit]</a><br>"
|
||||
if(unlock_content)
|
||||
dat += "<b>Ghost Form:</b> <a href='?_src_=prefs;task=input;preference=ghostform'>[ghost_form]</a><br>"
|
||||
dat += "<B>Ghost Orbit: </B> <a href='?_src_=prefs;task=input;preference=ghostorbit'>[ghost_orbit]</a><br>"
|
||||
|
||||
var/button_name = "If you see this something went wrong."
|
||||
switch(ghost_accs)
|
||||
@@ -523,8 +561,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(days_remaining)
|
||||
dat += "<b>Be [capitalize(i)]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
|
||||
else
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<h2>Citadel Preferences</h2>" //Because fuck me if preferences can't be fucking modularized and expected to update in a reasonable timeframe.
|
||||
dat += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
dat += "<b>Exhibitionist:</b><a href='?_src_=prefs;preference=exhibitionist'>[features["exhibitionist"] == TRUE ? "Yes" : "No"]</a><BR>"
|
||||
@@ -536,10 +574,42 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
|
||||
if (user && user.client && !user.client.prefs.screenshake==0)
|
||||
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Enabled" : "Disabled"]</a><br>"
|
||||
|
||||
dat += "</td></tr></table>"
|
||||
|
||||
if(3)
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>OOC Settings</h2>"
|
||||
dat += "<b>Window Flashing:</b> <a href='?_src_=prefs;preference=winflash'>[(windowflashing) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Play Admin MIDIs:</b> <a href='?_src_=prefs;preference=hear_midis'>[(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play Lobby Music:</b> <a href='?_src_=prefs;preference=lobby_music'>[(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>See Pull Requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
|
||||
if(user.client)
|
||||
if(unlock_content)
|
||||
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</a><br>"
|
||||
|
||||
if(unlock_content || check_rights_for(user.client, R_ADMIN))
|
||||
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'>Change</a><br>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(user.client.holder)
|
||||
dat +="<td width='300px' height='300px' valign='top'>"
|
||||
|
||||
dat += "<h2>Admin Settings</h2>"
|
||||
|
||||
dat += "<b>Adminhelp Sounds:</b> <a href='?_src_=prefs;preference=hear_adminhelps'>[(toggles & SOUND_ADMINHELP)?"Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Announce Login:</b> <a href='?_src_=prefs;preference=announce_login'>[(toggles & ANNOUNCE_LOGIN)?"Enabled":"Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Combo HUD Lighting:</b> <a href = '?_src_=prefs;preference=combohud_lighting'>[(toggles & COMBOHUD_LIGHTING)?"Full-bright":"No Change"]</a><br>"
|
||||
dat += "</td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
if(3)
|
||||
if(!gear_tab)
|
||||
gear_tab = GLOB.loadout_items[1]
|
||||
dat += "<table align='center' width='100%'>"
|
||||
@@ -603,9 +673,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</center>"
|
||||
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 770)
|
||||
popup.set_content(dat)
|
||||
popup.set_content(dat.Join())
|
||||
popup.open(0)
|
||||
|
||||
#undef APPEARANCE_CATEGORY_COLUMN
|
||||
#undef MAX_MUTANT_ROWS
|
||||
|
||||
/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620)
|
||||
if(!SSjob)
|
||||
return
|
||||
@@ -939,8 +1012,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(href_list["jobbancheck"])
|
||||
var/job = sanitizeSQL(href_list["jobbancheck"])
|
||||
var/sql_ckey = sanitizeSQL(user.ckey)
|
||||
var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, (SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].a_ckey) FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
|
||||
var/datum/DBQuery/query_get_jobban = SSdbcore.NewQuery("SELECT reason, bantime, duration, expiration_time, IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].a_ckey), a_ckey) FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
|
||||
if(!query_get_jobban.warn_execute())
|
||||
qdel(query_get_jobban)
|
||||
return
|
||||
if(query_get_jobban.NextRow())
|
||||
var/reason = query_get_jobban.item[1]
|
||||
@@ -954,6 +1028,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)"
|
||||
text += ".</span>"
|
||||
to_chat(user, text)
|
||||
qdel(query_get_jobban)
|
||||
return
|
||||
|
||||
if(href_list["preference"] == "job")
|
||||
@@ -1064,6 +1139,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
random_character()
|
||||
|
||||
if("input")
|
||||
|
||||
if(href_list["preference"] in GLOB.preferences_custom_names)
|
||||
ask_for_custom_name(user,href_list["preference"])
|
||||
|
||||
|
||||
switch(href_list["preference"])
|
||||
if("ghostform")
|
||||
if(unlock_content)
|
||||
@@ -1097,11 +1177,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
ghost_others = GHOST_OTHERS_SIMPLE
|
||||
|
||||
if("name")
|
||||
var/new_name = reject_bad_name( input(user, "Choose your character's name:", "Character Preference") as text|null )
|
||||
var/new_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
new_name = reject_bad_name(new_name)
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("age")
|
||||
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
|
||||
@@ -1113,7 +1195,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_hair)
|
||||
hair_color = sanitize_hexcolor(new_hair)
|
||||
|
||||
|
||||
if("hair_style")
|
||||
var/new_hair_style
|
||||
if(gender == MALE)
|
||||
@@ -1299,60 +1380,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_loc)
|
||||
uplink_spawn_loc = new_loc
|
||||
|
||||
if("human_name")
|
||||
var/new_human_name = reject_bad_name( input(user, "Choose your character's backup human name, used in the event you are assigned a command role as another species:", "Character Preference") as text|null )
|
||||
if(new_human_name)
|
||||
custom_names["human"] = new_human_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("clown_name")
|
||||
var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null )
|
||||
if(new_clown_name)
|
||||
custom_names["clown"] = new_clown_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("mime_name")
|
||||
var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null )
|
||||
if(new_mime_name)
|
||||
custom_names["mime"] = new_mime_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("ai_name")
|
||||
var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 )
|
||||
if(new_ai_name)
|
||||
custom_names["ai"] = new_ai_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
|
||||
|
||||
if("cyborg_name")
|
||||
var/raw_name = input(user, "Choose your character's cyborg name (Leave empty to use default naming scheme):", "Character Preference") as text|null
|
||||
var/new_cyborg_name
|
||||
if(!raw_name)
|
||||
new_cyborg_name = DEFAULT_CYBORG_NAME
|
||||
else
|
||||
new_cyborg_name = reject_bad_name(raw_name,1 )
|
||||
if(new_cyborg_name)
|
||||
custom_names["cyborg"] = new_cyborg_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
|
||||
|
||||
if("religion_name")
|
||||
var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null )
|
||||
if(new_religion_name)
|
||||
custom_names["religion"] = new_religion_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("deity_name")
|
||||
var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null )
|
||||
if(new_deity_name)
|
||||
custom_names["deity"] = new_deity_name
|
||||
else
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
|
||||
if("sec_dept")
|
||||
var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in GLOB.security_depts_prefs
|
||||
if(department)
|
||||
@@ -1396,7 +1423,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
|
||||
//CITADEL PREFERENCES EDIT - I can't figure out how to modularize these, so they have to go here. :c -Pooj
|
||||
if("genital_colour")
|
||||
features["genitals_use_skintone"] = !features["genitals_use_skintone"]
|
||||
@@ -1530,6 +1556,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
parallax = WRAP(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref(parent.mob)
|
||||
|
||||
// Citadel edit - Prefs don't work outside of this. :c
|
||||
if("hound_sleeper")
|
||||
cit_toggles ^= MEDIHOUND_SLEEPER
|
||||
@@ -1573,7 +1600,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("tab")
|
||||
if (href_list["tab"])
|
||||
current_tab = text2num(href_list["tab"])
|
||||
|
||||
if(href_list["preference"] == "gear")
|
||||
if(href_list["clear_loadout"])
|
||||
LAZYCLEARLIST(chosen_gear)
|
||||
@@ -1603,23 +1629,25 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
gear_points -= initial(G.cost)
|
||||
|
||||
process_citadel_link(user, href_list)
|
||||
|
||||
ShowChoices(user)
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1)
|
||||
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE)
|
||||
if(be_random_name)
|
||||
real_name = pref_species.random_name(gender)
|
||||
|
||||
if(be_random_body)
|
||||
random_character(gender)
|
||||
|
||||
if(CONFIG_GET(flag/humans_need_surnames) && (pref_species.id == "human"))
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(GLOB.last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(GLOB.last_names)]"
|
||||
if(roundstart_checks)
|
||||
if(CONFIG_GET(flag/humans_need_surnames) && (pref_species.id == "human"))
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(GLOB.last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(GLOB.last_names)]"
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
@@ -1648,15 +1676,48 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.dna.features = features.Copy()
|
||||
character.dna.real_name = character.real_name
|
||||
var/datum/species/chosen_species
|
||||
if(pref_species.id in GLOB.roundstart_races)
|
||||
if(!roundstart_checks || (pref_species.id in GLOB.roundstart_races))
|
||||
chosen_species = pref_species.type
|
||||
else
|
||||
chosen_species = /datum/species/human
|
||||
pref_species = new /datum/species/human
|
||||
save_character()
|
||||
character.set_species(chosen_species, icon_update=0)
|
||||
character.set_species(chosen_species, icon_update = FALSE, pref_load = TRUE)
|
||||
|
||||
if(icon_updates)
|
||||
character.update_body()
|
||||
character.update_hair()
|
||||
character.update_body_parts()
|
||||
|
||||
/datum/preferences/proc/get_default_name(name_id)
|
||||
switch(name_id)
|
||||
if("human")
|
||||
return random_unique_name()
|
||||
if("ai")
|
||||
return pick(GLOB.ai_names)
|
||||
if("cyborg")
|
||||
return DEFAULT_CYBORG_NAME
|
||||
if("clown")
|
||||
return pick(GLOB.clown_names)
|
||||
if("mime")
|
||||
return pick(GLOB.mime_names)
|
||||
return random_unique_name()
|
||||
|
||||
/datum/preferences/proc/ask_for_custom_name(mob/user,name_id)
|
||||
var/namedata = GLOB.preferences_custom_names[name_id]
|
||||
if(!namedata)
|
||||
return
|
||||
|
||||
var/raw_name = input(user, "Choose your character's [namedata["qdesc"]]:","Character Preference") as text|null
|
||||
if(!raw_name)
|
||||
if(namedata["allow_null"])
|
||||
custom_names[name_id] = get_default_name(name_id)
|
||||
else
|
||||
return
|
||||
else
|
||||
var/sanitized_name = reject_bad_name(raw_name,namedata["allow_numbers"])
|
||||
if(!sanitized_name)
|
||||
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z,[namedata["allow_numbers"] ? ",0-9," : ""] -, ' and .</font>")
|
||||
return
|
||||
else
|
||||
custom_names[name_id] = sanitized_name
|
||||
|
||||
Reference in New Issue
Block a user