12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
+208
-178
@@ -1,10 +1,11 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
|
||||
|
||||
/datum/preferences
|
||||
var/client/parent
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
@@ -41,23 +42,7 @@ var/list/preferences_datums = list()
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
|
||||
var/vore_banned_methods = 0
|
||||
var/vore_extra_bans = 65535
|
||||
var/list/vore_ability = list(
|
||||
"1"=2,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=1,
|
||||
"128"=0,
|
||||
"256"=2) //BAAAAD way to do this
|
||||
var/character_size="normal"
|
||||
var/be_taur=0
|
||||
|
||||
var/list/p_cock=list("has"=0,"type"="human","color"="900","sheath"="FFF")
|
||||
var/p_vagina=0
|
||||
var/uses_glasses_colour = 0
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
@@ -76,11 +61,8 @@ var/list/preferences_datums = list()
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/eye_color = "000" //Eye color
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "tail_lizard" = "Smooth",
|
||||
"tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None",
|
||||
"wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None",
|
||||
"mam_body_markings" = "None", "mam_ears" = "None", "mam_tail" = "None", "mam_tail_animated" = "None",
|
||||
"xenodorsal" = "None", "xenohead" = "None", "xenotail" = "None")
|
||||
var/list/features = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "mam_body_markings" = "None", "mam_ears" = "None", "mam_tail" = "None", "mam_tail_animated" = "None",
|
||||
"xenodorsal" = "None", "xenohead" = "None", "xenotail" = "None", "legs" = "Normal Legs")
|
||||
|
||||
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
|
||||
//Mob preview
|
||||
@@ -100,29 +82,31 @@ var/list/preferences_datums = list()
|
||||
var/job_engsec_low = 0
|
||||
|
||||
// Want randomjob if preferences already filled - Donkie
|
||||
var/userandomjob = 1 //defaults to 1 for fewer assistants
|
||||
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
|
||||
|
||||
// 0 = character settings, 1 = game preferences
|
||||
var/current_tab = 0
|
||||
|
||||
// OOC Metadata:
|
||||
//var/metadata = ""
|
||||
var/flavor_text = ""
|
||||
|
||||
// Vore prefs
|
||||
var/digestable = 1
|
||||
var/devourable = 0
|
||||
var/list/belly_prefs = list()
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
var/unlock_content = 0
|
||||
|
||||
var/list/ignoring = list()
|
||||
|
||||
//Parallax prefs
|
||||
var/space_parallax = 1
|
||||
var/space_dust = 1
|
||||
var/parallax_speed = 2
|
||||
var/clientfps = 0
|
||||
|
||||
var/parallax = PARALLAX_HIGH
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["ai"] = pick(ai_names)
|
||||
custom_names["cyborg"] = pick(ai_names)
|
||||
custom_names["clown"] = pick(clown_names)
|
||||
@@ -185,7 +169,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=job;task=menu'>Set Occupation Preferences</a><br></center>"
|
||||
dat += "<h2>Identity</h2>"
|
||||
dat += "<table width='100%'><tr><td width='75%' valign='top'>"
|
||||
if(appearance_isbanned(user))
|
||||
if(jobban_isbanned(user, "appearance"))
|
||||
dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=name;task=random'>Random Name</A> "
|
||||
dat += "<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a><BR>"
|
||||
@@ -218,8 +202,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
|
||||
|
||||
if(config.mutant_races)
|
||||
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
|
||||
dat += "<BR>"
|
||||
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>"
|
||||
|
||||
@@ -228,6 +211,7 @@ var/list/preferences_datums = list()
|
||||
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></td>"
|
||||
|
||||
|
||||
// dat += "<b>Size:</b> <a href='?_src_=prefs;preference=character_size;task=input'>[character_size]</a><BR>"
|
||||
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=input'><b>Set Flavor Text</b></a><br>"
|
||||
if(lentext(flavor_text) <= 40)
|
||||
@@ -249,7 +233,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(HAIR in pref_species.specflags)
|
||||
if(HAIR in pref_species.species_traits)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
@@ -270,7 +254,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(EYECOLOR in pref_species.specflags)
|
||||
if(EYECOLOR in pref_species.species_traits)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
@@ -282,20 +266,21 @@ var/list/preferences_datums = list()
|
||||
|
||||
if(config.mutant_races) //We don't allow mutant bodyparts for humans either unless this is true.
|
||||
|
||||
if((MUTCOLORS in pref_species.specflags) || (MUTCOLORS_PARTSONLY in pref_species.specflags))
|
||||
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
dat += "<td valign='top' width='14%'>"
|
||||
|
||||
dat += "<h3>Alien/Mutant Colors</h3>"
|
||||
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>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'> </span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'> </span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
//lizard bodyparts
|
||||
|
||||
if("tail_lizard" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
@@ -349,7 +334,8 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
//Mammal bodyparts
|
||||
|
||||
//Mammal bodyparts
|
||||
if("mam_body_markings" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
@@ -366,6 +352,13 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
|
||||
|
||||
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("mam_ears" in pref_species.mutant_bodyparts)
|
||||
@@ -440,7 +433,7 @@ var/list/preferences_datums = list()
|
||||
if (1) // Game Preferences
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'>[UI_style]</a><br>"
|
||||
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>tgui Style:</b> <a href='?_src_=prefs;preference=tgui_fancy'>[(tgui_fancy) ? "Fancy" : "No Frills"]</a><br>"
|
||||
dat += "<b>tgui Monitors:</b> <a href='?_src_=prefs;preference=tgui_lock'>[(tgui_lock) ? "Primary" : "All"]</a><br>"
|
||||
@@ -453,10 +446,6 @@ var/list/preferences_datums = list()
|
||||
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>"
|
||||
dat += "<b>Space Parallax:</b> <a href='?_src_=prefs;preference=parallax'>[space_parallax ? "Enabled" : "Disabled"]</a><br>"
|
||||
if(space_parallax)
|
||||
dat += "<b>Parallax Speed:</b> <a href='?_src_=prefs;preference=p_speed'>[parallax_speed]</a><br>"
|
||||
dat += "<b>Space Dust:</b> <a href='?_src_=prefs;preference=dust'>[space_dust ? "Yes" : "No"]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'>Edit </a><br>"
|
||||
|
||||
@@ -509,7 +498,23 @@ var/list/preferences_datums = list()
|
||||
p_map = VM.friendlyname
|
||||
else
|
||||
p_map += " (No longer exists)"
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a>"
|
||||
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>"
|
||||
|
||||
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallaxdown' oncontextmenu='window.location.href=\"?_src_=prefs;preference=parallaxup\";return false;'>"
|
||||
switch (parallax)
|
||||
if (PARALLAX_LOW)
|
||||
dat += "Low"
|
||||
if (PARALLAX_MED)
|
||||
dat += "Medium"
|
||||
if (PARALLAX_INSANE)
|
||||
dat += "Insane"
|
||||
if (PARALLAX_DISABLE)
|
||||
dat += "Disabled"
|
||||
else
|
||||
dat += "High"
|
||||
dat += "</a><br>"
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
|
||||
@@ -546,7 +551,6 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
|
||||
dat += "</center>"
|
||||
|
||||
//user << browse(dat, "window=preferences;size=560x560")
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
@@ -563,108 +567,116 @@ var/list/preferences_datums = list()
|
||||
var/width = widthPerColumn
|
||||
|
||||
var/HTML = "<center>"
|
||||
HTML += "<b>Choose occupation chances</b><br>"
|
||||
HTML += "<div align='center'>Left-click to raise an occupation preference, right-click to lower it.<br></div>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
HTML += "<script type='text/javascript'>function setJobPrefRedirect(level, rank) { window.location.href='?_src_=prefs;preference=job;task=setJobLevel;level=' + level + ';text=' + encodeURIComponent(rank); return false; }</script>"
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
if(SSjob.occupations.len <= 0)
|
||||
HTML += "The job ticker is not yet finished creating jobs, please try again later"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
else
|
||||
HTML += "<b>Choose occupation chances</b><br>"
|
||||
HTML += "<div align='center'>Left-click to raise an occupation preference, right-click to lower it.<br></div>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
HTML += "<script type='text/javascript'>function setJobPrefRedirect(level, rank) { window.location.href='?_src_=prefs;preference=job;task=setJobLevel;level=' + level + ';text=' + encodeURIComponent(rank); return false; }</script>"
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
width += widthPerColumn
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
|
||||
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><a href='?_src_=prefs;jobbancheck=[rank]'> BANNED</a></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS\]</font></td></tr>"
|
||||
continue
|
||||
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(user.client.prefs.pref_species.id == "human")
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[MUTANT\]</b></font></td></tr>"
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
width += widthPerColumn
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><a href='?_src_=prefs;jobbancheck=[rank]'> BANNED</a></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS\]</font></td></tr>"
|
||||
continue
|
||||
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(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
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[NON-HUMAN\]</b></font></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
else
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[NON-HUMAN\]</b></font></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
else
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
|
||||
HTML += "</td><td width='40%'>"
|
||||
HTML += "</td><td width='40%'>"
|
||||
|
||||
var/prefLevelLabel = "ERROR"
|
||||
var/prefLevelColor = "pink"
|
||||
var/prefUpperLevel = -1 // level to assign on left click
|
||||
var/prefLowerLevel = -1 // level to assign on right click
|
||||
var/prefLevelLabel = "ERROR"
|
||||
var/prefLevelColor = "pink"
|
||||
var/prefUpperLevel = -1 // level to assign on left click
|
||||
var/prefLowerLevel = -1 // level to assign on right click
|
||||
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
prefUpperLevel = 4
|
||||
prefLowerLevel = 2
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
prefUpperLevel = 1
|
||||
prefLowerLevel = 3
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
prefUpperLevel = 2
|
||||
prefLowerLevel = 4
|
||||
else
|
||||
prefLevelLabel = "NEVER"
|
||||
prefLevelColor = "red"
|
||||
prefUpperLevel = 3
|
||||
prefLowerLevel = 1
|
||||
|
||||
|
||||
HTML += "<a class='white' href='?_src_=prefs;preference=job;task=setJobLevel;level=[prefUpperLevel];text=[rank]' oncontextmenu='javascript:return setJobPrefRedirect([prefLowerLevel], \"[rank]\");'>"
|
||||
|
||||
if(rank == "Assistant")//Assistant is special
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
HTML += "<font color=green>Yes</font>"
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
prefUpperLevel = 4
|
||||
prefLowerLevel = 2
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
prefUpperLevel = 1
|
||||
prefLowerLevel = 3
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
prefUpperLevel = 2
|
||||
prefLowerLevel = 4
|
||||
else
|
||||
HTML += "<font color=red>No</font>"
|
||||
prefLevelLabel = "NEVER"
|
||||
prefLevelColor = "red"
|
||||
prefUpperLevel = 3
|
||||
prefLowerLevel = 1
|
||||
|
||||
|
||||
HTML += "<a class='white' href='?_src_=prefs;preference=job;task=setJobLevel;level=[prefUpperLevel];text=[rank]' oncontextmenu='javascript:return setJobPrefRedirect([prefLowerLevel], \"[rank]\");'>"
|
||||
|
||||
if(rank == "Assistant")//Assistant is special
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
HTML += "<font color=green>Yes</font>"
|
||||
else
|
||||
HTML += "<font color=red>No</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
|
||||
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</td'></tr></table>"
|
||||
HTML += "</center></table>"
|
||||
|
||||
HTML += "</td'></tr></table>"
|
||||
|
||||
HTML += "</center></table>"
|
||||
|
||||
HTML += "<center><br><a href='?_src_=prefs;preference=job;task=random'>[userandomjob ? "Get random job if preferences unavailable" : "Be an Assistant if preference unavailable"]</a></center>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>Reset Preferences</a></center>"
|
||||
var/message = "Be an Assistant if preferences unavailable"
|
||||
if(joblessrole == BERANDOMJOB)
|
||||
message = "Get random job if preferences unavailable"
|
||||
else if(joblessrole == RETURNTOLOBBY)
|
||||
message = "Return to lobby if preferences unavailable"
|
||||
HTML += "<center><br><a href='?_src_=prefs;preference=job;task=random'>[message]</a></center>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>Reset Preferences</a></center>"
|
||||
|
||||
user << browse(null, "window=preferences")
|
||||
//user << browse(HTML, "window=mob_occupation;size=[width]x[height]")
|
||||
var/datum/browser/popup = new(user, "mob_occupation", "<div align='center'>Occupation Preferences</div>", width, height)
|
||||
popup.set_window_options("can_close=0")
|
||||
popup.set_content(HTML)
|
||||
@@ -730,7 +742,7 @@ var/list/preferences_datums = list()
|
||||
return 0
|
||||
|
||||
/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl)
|
||||
if(!SSjob)
|
||||
if(!SSjob || SSjob.occupations.len <= 0)
|
||||
return
|
||||
var/datum/job/job = SSjob.GetJob(role)
|
||||
|
||||
@@ -835,10 +847,16 @@ var/list/preferences_datums = list()
|
||||
ResetJobs()
|
||||
SetChoices(user)
|
||||
if("random")
|
||||
if(jobban_isbanned(user, "Assistant"))
|
||||
userandomjob = 1
|
||||
else
|
||||
userandomjob = !userandomjob
|
||||
switch(joblessrole)
|
||||
if(RETURNTOLOBBY)
|
||||
if(jobban_isbanned(user, "Assistant"))
|
||||
joblessrole = BERANDOMJOB
|
||||
else
|
||||
joblessrole = BEASSISTANT
|
||||
if(BEASSISTANT)
|
||||
joblessrole = BERANDOMJOB
|
||||
if(BERANDOMJOB)
|
||||
joblessrole = RETURNTOLOBBY
|
||||
SetChoices(user)
|
||||
if("setJobLevel")
|
||||
UpdateJobPreference(user, href_list["text"], text2num(href_list["level"]))
|
||||
@@ -921,19 +939,18 @@ var/list/preferences_datums = list()
|
||||
if(new_age)
|
||||
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
|
||||
|
||||
/*if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))*/
|
||||
|
||||
if("flavor_text")
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
|
||||
|
||||
if("hair")
|
||||
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color
|
||||
if(new_hair)
|
||||
@@ -1018,27 +1035,26 @@ var/list/preferences_datums = list()
|
||||
|
||||
if("species")
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in get_racelist(user)
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
|
||||
if(result)
|
||||
var/newtype = roundstart_species[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"])
|
||||
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
features["mcolor"] = pref_species.default_color
|
||||
if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
features["mcolor2"] = pref_species.default_color
|
||||
if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
|
||||
if("mutant_color")
|
||||
var/new_mutantcolor = input(user, "Choose your character's primary alien/mutant color:", "Character Preference") as color|null
|
||||
var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1049,7 +1065,7 @@ var/list/preferences_datums = list()
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor2"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor2"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1060,7 +1076,7 @@ var/list/preferences_datums = list()
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor3"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1082,6 +1098,7 @@ var/list/preferences_datums = list()
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in mam_tails_list
|
||||
if(new_tail)
|
||||
features["mam_tail"] = new_tail
|
||||
|
||||
/* Doesn't exist yet. will include facial overlays to mimic 5th port species heads.
|
||||
if("mam_snout")
|
||||
var/new_snout
|
||||
@@ -1089,6 +1106,7 @@ var/list/preferences_datums = list()
|
||||
if(new_snout)
|
||||
features["snout"] = new_snout
|
||||
*/
|
||||
|
||||
if("snout")
|
||||
var/new_snout
|
||||
new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snouts_list
|
||||
@@ -1162,13 +1180,19 @@ var/list/preferences_datums = list()
|
||||
if(new_dors)
|
||||
features["xenodorsal"] = new_dors
|
||||
|
||||
if("legs")
|
||||
var/new_legs
|
||||
new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in legs_list
|
||||
if(new_legs)
|
||||
features["legs"] = new_legs
|
||||
|
||||
if("s_tone")
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
|
||||
if(new_s_tone)
|
||||
skin_tone = new_s_tone
|
||||
|
||||
if("ooccolor")
|
||||
var/new_ooccolor = input(user, "Choose your OOC color:", "Game Preference") as color|null
|
||||
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
|
||||
if(new_ooccolor)
|
||||
ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
|
||||
@@ -1233,6 +1257,21 @@ var/list/preferences_datums = list()
|
||||
var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist
|
||||
if (pickedmap)
|
||||
preferred_map = maplist[pickedmap]
|
||||
if ("clientfps")
|
||||
var/version_message
|
||||
if (user.client && user.client.byond_version < 511)
|
||||
version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low"
|
||||
if (world.byond_version < 511)
|
||||
version_message += "\nThis server does not currently support client side fps. You can set now for when it does."
|
||||
var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
|
||||
if (!isnull(desiredfps))
|
||||
clientfps = desiredfps
|
||||
if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
|
||||
user.client.vars["fps"] = clientfps
|
||||
if("ui")
|
||||
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
|
||||
|
||||
|
||||
else
|
||||
@@ -1251,19 +1290,6 @@ var/list/preferences_datums = list()
|
||||
facial_hair_style = random_facial_hair_style(gender)
|
||||
hair_style = random_hair_style(gender)
|
||||
|
||||
if("ui")
|
||||
switch(UI_style)
|
||||
if("Midnight")
|
||||
UI_style = "Plasmafire"
|
||||
if("Plasmafire")
|
||||
UI_style = "Retro"
|
||||
if("Retro")
|
||||
UI_style = "Slimecore"
|
||||
if("Slimecore")
|
||||
UI_style = "Operative"
|
||||
else
|
||||
UI_style = "Midnight"
|
||||
|
||||
if("hotkeys")
|
||||
hotkeys = !hotkeys
|
||||
|
||||
@@ -1284,15 +1310,6 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
be_special += be_special_type
|
||||
|
||||
if("parallax")
|
||||
space_parallax = !space_parallax
|
||||
|
||||
if("dust")
|
||||
space_dust = !space_dust
|
||||
|
||||
if("p_speed")
|
||||
parallax_speed = min(max(input(user, "Enter a number between 0 and 5 included (default=2)","Parallax Speed Preferences",parallax_speed),0),5)
|
||||
|
||||
if("name")
|
||||
be_random_name = !be_random_name
|
||||
|
||||
@@ -1330,6 +1347,16 @@ var/list/preferences_datums = list()
|
||||
if("allow_midround_antag")
|
||||
toggles ^= MIDROUND_ANTAG
|
||||
|
||||
if("parallaxup")
|
||||
parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("parallaxdown")
|
||||
parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
@@ -1371,6 +1398,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
|
||||
if(!length(belly_prefs))
|
||||
@@ -1389,6 +1417,7 @@ var/list/preferences_datums = list()
|
||||
B.owner = character
|
||||
|
||||
character.digestable = digestable
|
||||
// character.devourable = devourable
|
||||
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
@@ -1403,6 +1432,7 @@ var/list/preferences_datums = list()
|
||||
character.underwear = underwear
|
||||
character.undershirt = undershirt
|
||||
character.socks = socks
|
||||
|
||||
character.backbag = backbag
|
||||
|
||||
character.dna.features = features.Copy()
|
||||
|
||||
Reference in New Issue
Block a user