Configuration datum refactor
This commit is contained in:
committed by
CitadelStationBot
parent
d25894447e
commit
e5ef3d2405
@@ -274,8 +274,174 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<div class='statusDisplay'><center><img src=previewicon.png width=[preview_icon.Width()] height=[preview_icon.Height()]></center></div>"
|
||||
|
||||
dat += "</td></tr></table>"
|
||||
<<<<<<< HEAD
|
||||
// dat += "<b>Size:</b> <a href='?_src_=prefs;preference=character_size;task=input'>[character_size]</a><BR>"
|
||||
dat += "<br>"
|
||||
=======
|
||||
|
||||
dat += "<h2>Body</h2>"
|
||||
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A> "
|
||||
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><br>"
|
||||
|
||||
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
|
||||
|
||||
if(CONFIG_GET(flag/join_with_mutant_race))
|
||||
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
|
||||
else
|
||||
dat += "<b>Species:</b> Human<BR>"
|
||||
|
||||
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
|
||||
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
|
||||
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)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Skin Tone</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(HAIR in pref_species.species_traits)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Hair Style</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
|
||||
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>"
|
||||
dat += "<a href='?_src_=prefs;preference=previous_facehair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_facehair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[facial_hair_color];'> </span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(EYECOLOR in pref_species.species_traits)
|
||||
|
||||
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(CONFIG_GET(flag/join_with_mutant_race)) //We don't allow mutant bodyparts for humans either unless this is true.
|
||||
|
||||
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%'>"
|
||||
|
||||
dat += "<h3>Tail</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("snout" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Snout</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("horns" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Horns</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("frills" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Frills</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("spines" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Spines</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("body_markings" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
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%'>"
|
||||
|
||||
dat += "<h3>Legs</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
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%'>"
|
||||
|
||||
dat += "<h3>Wings</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
dat += "</tr></table>"
|
||||
|
||||
>>>>>>> 4178c20... Configuration datum refactor (#30763)
|
||||
|
||||
if (1) // Game Preferences
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
@@ -295,7 +461,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
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.allow_Metadata)
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'>Edit </a><br>"
|
||||
|
||||
if(user.client)
|
||||
@@ -332,7 +498,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
dat += "<b>Ghosts of Others:</b> <a href='?_src_=prefs;task=input;preference=ghostothers'>[button_name]</a><br>"
|
||||
|
||||
if (config.maprotation)
|
||||
if (CONFIG_GET(flag/maprotation))
|
||||
var/p_map = preferred_map
|
||||
if (!p_map)
|
||||
p_map = "Default"
|
||||
@@ -347,7 +513,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
p_map = VM.map_name
|
||||
else
|
||||
p_map += " (No longer exists)"
|
||||
if(config.allow_map_voting)
|
||||
if(CONFIG_GET(flag/allow_map_voting))
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
|
||||
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
@@ -385,7 +551,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
|
||||
else
|
||||
var/days_remaining = null
|
||||
if(config.use_age_restriction_for_jobs && ispath(GLOB.special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age
|
||||
if(ispath(GLOB.special_roles[i]) && CONFIG_GET(flag/use_age_restriction_for_jobs)) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/mode_path = GLOB.special_roles[i]
|
||||
var/datum/game_mode/temp_mode = new mode_path
|
||||
days_remaining = temp_mode.get_remaining_days(user.client)
|
||||
@@ -599,7 +765,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features))
|
||||
if(CONFIG_GET(flag/enforce_human_authority) && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features))
|
||||
if(user.client.prefs.pref_species.id == "human")
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[MUTANT\]</b></font></td></tr>"
|
||||
else
|
||||
@@ -1023,10 +1189,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
if("species")
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_species
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in CONFIG_GET(keyed_flag_list/roundstart_races)
|
||||
|
||||
if(result)
|
||||
var/newtype = GLOB.roundstart_species[result]
|
||||
var/newtype = GLOB.species_list[result]
|
||||
pref_species = new newtype()
|
||||
//Now that we changed our species, we must verify that the mutant colour is still allowed.
|
||||
var/temp_hsv = RGBtoHSV(features["mcolor"])
|
||||
@@ -1622,7 +1788,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(be_random_body)
|
||||
random_character(gender)
|
||||
|
||||
if(config.humans_need_surnames)
|
||||
if(CONFIG_GET(flag/humans_need_surnames))
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
@@ -1657,7 +1823,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
character.dna.features = features.Copy() //Flavor text is now a DNA feature
|
||||
character.dna.real_name = character.real_name
|
||||
var/datum/species/chosen_species
|
||||
if(pref_species != /datum/species/human && config.mutant_races)
|
||||
if(pref_species != /datum/species/human && CONFIG_GET(flag/join_with_mutant_race))
|
||||
chosen_species = pref_species.type
|
||||
else
|
||||
chosen_species = /datum/species/human
|
||||
|
||||
Reference in New Issue
Block a user