Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+46 -50
View File
@@ -128,7 +128,6 @@ var/list/preferences_datums = list()
"womb_fluid" = "femcum"
)//MAKE SURE TO UPDATE THE LIST IN MOBS.DM IF YOU'RE GOING TO ADD TO THIS LIST, OTHERWISE THINGS MIGHT GET FUCKEY
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
var/prefered_security_department = SEC_DEPT_RANDOM
@@ -149,17 +148,12 @@ var/list/preferences_datums = list()
var/job_engsec_med = 0
var/job_engsec_low = 0
//citadel code
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
// Want randomjob if preferences already filled - Donkie
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
// 0 = character settings, 1 = game preferences, 2 = character appearance
var/current_tab = 0
var/flavor_text = ""
// OOC Metadata:
var/metadata = ""
@@ -169,10 +163,14 @@ var/list/preferences_datums = list()
var/clientfps = 0
var/parallax = PARALLAX_DISABLE //Starting disabled by default so people stop freaking about about certain issues.
var/parallax
var/uplink_spawn_loc = UPLINK_PDA
//citadel code
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
var/flavor_text = ""
/datum/preferences/New(client/C)
parent = C
custom_names["ai"] = pick(ai_names)
@@ -211,7 +209,6 @@ var/list/preferences_datums = list()
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=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
if(!path)
dat += "<div class='notice'>Please create an account to save your preferences</div>"
@@ -324,22 +321,23 @@ var/list/preferences_datums = list()
dat += "<b>Ghosts of Others:</b> <a href='?_src_=prefs;task=input;preference=ghostothers'>[button_name]</a><br>"
if (SERVERTOOLS && config.maprotation)
if (config.maprotation)
var/p_map = preferred_map
if (!p_map)
p_map = "Default"
if (config.defaultmap)
p_map += " ([config.defaultmap.friendlyname])"
p_map += " ([config.defaultmap.map_name])"
else
if (p_map in config.maplist)
var/datum/votablemap/VM = config.maplist[p_map]
var/datum/map_config/VM = config.maplist[p_map]
if (!VM)
p_map += " (No longer exists)"
else
p_map = VM.friendlyname
p_map = VM.map_name
else
p_map += " (No longer exists)"
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
if(config.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>"
@@ -514,7 +512,7 @@ var/list/preferences_datums = list()
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
dat += "</center>"
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 770)
popup.set_content(dat)
popup.open(0)
@@ -715,7 +713,7 @@ var/list/preferences_datums = list()
return
if (!isnum(desiredLvl))
user << "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>"
to_chat(user, "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>")
ShowChoices(user)
return
@@ -782,10 +780,8 @@ var/list/preferences_datums = list()
if(href_list["jobbancheck"])
var/job = sanitizeSQL(href_list["jobbancheck"])
var/sql_ckey = sanitizeSQL(user.ckey)
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND job = '[job]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_get_jobban.Execute())
var/err = query_get_jobban.ErrorMsg()
log_game("SQL ERROR obtaining reason from ban table. Error : \[[err]\]\n")
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, 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())
return
if(query_get_jobban.NextRow())
var/reason = query_get_jobban.item[1]
@@ -798,7 +794,7 @@ var/list/preferences_datums = list()
if(text2num(duration) > 0)
text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)"
text += ".</span>"
user << text
to_chat(user, text)
return
if(href_list["preference"] == "job")
@@ -895,7 +891,7 @@ var/list/preferences_datums = list()
if(new_name)
real_name = new_name
else
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>"
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
@@ -997,11 +993,7 @@ var/list/preferences_datums = list()
eye_color = sanitize_hexcolor(new_eyes)
if("species")
/* for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath()
var/list/wlist = S.whitelist
if(S.whitelisted && (wlist.Find(user.ckey) || wlist.Find(user.key) || user.client.holder)) //If your ckey is on the species whitelist or you're an admin:)
roundstart_species[S.id] = S */
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
if(result)
@@ -1025,7 +1017,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("mutant_color2")
var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null
@@ -1036,7 +1028,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("mutant_color3")
var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null
@@ -1047,7 +1039,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("tail_lizard")
var/new_tail
@@ -1064,7 +1056,6 @@ var/list/preferences_datums = list()
features["tail_human"] = new_tail
if(new_tail != "None")
features["taur"] = "None"
if("mam_tail")
var/new_tail
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in mam_tails_list
@@ -1184,73 +1175,74 @@ var/list/preferences_datums = list()
if(new_backbag)
backbag = new_backbag
if("uplink_loc")
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
if(new_loc)
uplink_spawn_loc = new_loc
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
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>"
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
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>"
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
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>"
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/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 )
if(new_cyborg_name)
custom_names["cyborg"] = new_cyborg_name
else
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>"
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
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>"
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
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>"
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 security_depts_prefs
if(department)
prefered_security_department = department
if("uplink_loc")
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
if(new_loc)
uplink_spawn_loc = new_loc
if ("preferred_map")
var/maplist = list()
var/default = "Default"
if (config.defaultmap)
default += " ([config.defaultmap.friendlyname])"
default += " ([config.defaultmap.map_name])"
for (var/M in config.maplist)
var/datum/votablemap/VM = config.maplist[M]
var/friendlyname = "[VM.friendlyname] "
var/datum/map_config/VM = config.maplist[M]
var/friendlyname = "[VM.map_name] "
if (VM.voteweight <= 0)
friendlyname += " (disabled)"
maplist[friendlyname] = VM.name
maplist[friendlyname] = VM.map_name
maplist[default] = null
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)
@@ -1343,7 +1335,6 @@ var/list/preferences_datums = list()
else
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
else
switch(href_list["preference"])
@@ -1576,16 +1567,18 @@ var/list/preferences_datums = list()
else if(firstspace == name_length)
real_name += "[pick(last_names)]"
//citadel code
character.canbearoused = arousable
character.real_name = real_name
character.name = character.real_name
character.flavor_text = flavor_text
character.gender = gender
character.age = age
character.eye_color = eye_color
var/obj/item/organ/eyes/organ_eyes = character.getorgan(/obj/item/organ/eyes)
if(organ_eyes)
if(!initial(organ_eyes.eye_color))
organ_eyes.eye_color = eye_color
organ_eyes.old_eye_color = eye_color
character.hair_color = hair_color
character.facial_hair_color = facial_hair_color
@@ -1606,10 +1599,13 @@ var/list/preferences_datums = list()
else
chosen_species = /datum/species/human
character.set_species(chosen_species, icon_update=0)
//citadel code
character.give_genitals()
character.flavor_text = flavor_text
character.canbearoused = arousable
if(icon_updates)
character.update_body()
character.update_hair()
character.update_body_parts()
character.update_body_parts()