diff --git a/code/citadel/_helpers.dm b/code/citadel/_helpers.dm index d38c009bbb..dc24a27f4b 100644 --- a/code/citadel/_helpers.dm +++ b/code/citadel/_helpers.dm @@ -40,7 +40,7 @@ proc/kpcode_race_get(var/name="human") return return_this else return kpcode_race_get() -/* + proc/kpcode_race_san(var/input) if(!input)input="human" if(istype(input,/datum/species)) @@ -53,7 +53,7 @@ proc/kpcode_race_restricted(var/name="human") var/datum/species/D=kpcode_race_get(name) return D.restricted return 2 - +/* proc/kpcode_race_tail(var/name="human") name=kpcode_race_san(name) if(kpcode_race_get(name)) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index ed2d5c2b1a..c100a0d2f5 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -1,4 +1,4 @@ -//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped. + //This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped. #define SAVEFILE_VERSION_MIN 8 //This is the current version, anything below this will attempt to update (if it's not obsolete) @@ -8,14 +8,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car This proc checks if the current directory of the savefile S needs updating It is to be used by the load_character and load_preferences procs. (S.cd=="/" is preferences, S.cd=="/character[integer]" is a character slot, etc) - if the current directory's version is below SAVEFILE_VERSION_MIN it will simply wipe everything in that directory (if we're at root "/" then it'll just wipe the entire savefile, for instance.) - if its version is below SAVEFILE_VERSION_MAX but above the minimum, it will load data but later call the respective update_preferences() or update_character() proc. Those procs allow coders to specify format changes so users do not lose their setups and have to redo them again. - Failing all that, the standard sanity checks are performed. They simply check the data is suitable, reverting to initial() values if necessary. */ @@ -195,9 +192,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(needs_update == -2) //fatal, can't load any data return 0 - if(!S["species"] || !config.mutant_races) - S["species"] << new /datum/species/human() - //general preferences S["ooccolor"] >> ooccolor S["lastchangelog"] >> lastchangelog @@ -299,21 +293,21 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car return 0 //Species - /*var/species_name - S["species"] >> species_name - if(config.mutant_races && species_name && (species_name in roundstart_species)) - var/newtype = roundstart_species[species_name] + var/species_id + S["species"] >> species_id + if(config.mutant_races && species_id && (species_id in roundstart_species)) + var/newtype = roundstart_species[species_id] pref_species = new newtype() else - pref_species = new /datum/species/human() + var/rando_race = pick(config.roundstart_races) + pref_species = new rando_race() if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000") - S["features["mcolor"]"] << "#FFF"*/ - - if(!S["species"] || !config.mutant_races) - S["species"] << new /datum/species/human() - //if(!S["mutant_color"] || S["mutant_color"] == "#000") - // S["mutant_color"] << "#FFF" + S["features["mcolor"]"] << "#FFF" + if(!S["features["mcolor2"]"] || S["features["mcolor2"]"] == "#000") + S["features["mcolor2"]"] << "#FFF" + if(!S["features["mcolor3"]"] || S["features["mcolor3"]"] == "#000") + S["features["mcolor3"]"] << "#FFF" //Character S["Flavor_Text"] >> flavor_text @@ -333,12 +327,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["socks"] >> socks S["backbag"] >> backbag S["feature_mcolor"] >> features["mcolor"] + S["feature_mcolor2"] >> features["mcolor2"] + S["feature_mcolor3"] >> features["mcolor3"] S["feature_lizard_tail"] >> features["tail_lizard"] S["feature_lizard_snout"] >> features["snout"] S["feature_lizard_horns"] >> features["horns"] S["feature_lizard_frills"] >> features["frills"] S["feature_lizard_spines"] >> features["spines"] S["feature_lizard_body_markings"] >> features["body_markings"] + S["feature_mammal_body_markings"] >> features["mam_body_markings"] if(!config.mutant_humans) features["tail_human"] = "none" features["ears"] = "none" @@ -351,22 +348,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["cyborg_name"] >> custom_names["cyborg"] S["religion_name"] >> custom_names["religion"] S["deity_name"] >> custom_names["deity"] - S["species"] >> pref_species - - //Customs - S["mutant_tail"] >> mutant_tail - S["mutant_wing"] >> mutant_wing - S["wingcolor"] >> wingcolor - //S["special_color_one"] >> special_color_one - //S["special_color_two"] >> special_color_two - //S["special_color"] >> special_color - S["be_taur"] >> be_taur - S["vore_ability"] >> vore_ability - S["vore_banned_methods"]>> vore_banned_methods - S["vore_extra_bans"] >> vore_extra_bans - S["character_size"] >> character_size - S["p_cock"] >> p_cock - S["p_vagina"] >> p_vagina //Jobs S["userandomjob"] >> userandomjob @@ -387,12 +368,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car //Sanitize flavor_text = sanitize_text(flavor_text, initial(flavor_text)) real_name = reject_bad_name(real_name) - //if(!(pref_species in species_list)) - if(!(pref_species)) - pref_species = new /datum/species/human() - //if(!mutant_color || mutant_color == "#000") - // mutant_color = "#FFF" - if(!real_name) real_name = random_unique_name(gender) + if(!features["mcolor"] || features["mcolor"] == "#000") + features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") + if(!features["mcolor2"] || features["mcolor"] == "#000") + features["mcolor2"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") + if(!features["mcolor3"] || features["mcolor"] == "#000") + features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F") + if(!real_name) + real_name = random_unique_name(gender) be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) be_random_body = sanitize_integer(be_random_body, 0, 1, initial(be_random_body)) gender = sanitize_gender(gender) @@ -413,8 +396,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car eye_color = sanitize_hexcolor(eye_color, 3, 0) skin_tone = sanitize_inlist(skin_tone, skin_tones) backbag = sanitize_inlist(backbag, backbaglist, initial(backbag)) - /* features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0) + features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0) + features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0) features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], tails_list_lizard) features["tail_human"] = sanitize_inlist(features["tail_human"], tails_list_human, "None") features["snout"] = sanitize_inlist(features["snout"], snouts_list) @@ -422,20 +406,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["ears"] = sanitize_inlist(features["ears"], ears_list, "None") features["frills"] = sanitize_inlist(features["frills"], frills_list) features["spines"] = sanitize_inlist(features["spines"], spines_list) - features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list)*/ - - mutant_tail = sanitize_text(mutant_tail, initial(mutant_tail)) - mutant_wing = sanitize_text(mutant_wing, initial(mutant_wing)) - wingcolor = sanitize_hexcolor(wingcolor, 3, 0) - character_size = sanitize_text(character_size, initial(character_size)) -// mutant_color = sanitize_hexcolor(mutant_color, 3, 0) - - vore_ability=sanitize_vore_list(vore_ability) - if(isnull(vore_banned_methods))vore_banned_methods=0 - if(isnull(vore_extra_bans))vore_extra_bans=65535 - if(isnull(p_vagina)) p_vagina=gender==FEMALE - if(isnull(p_cock)) - p_cock=list("has"=gender==MALE,"type"="human","color"="900") + features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list) + features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], body_markings_list) userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob)) job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high)) @@ -461,7 +433,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["version"] << SAVEFILE_VERSION_MAX //load_character will sanitize any bad data, so assume up-to-date. //Character - S["Flavor_Text"] << flavor_text + S["Flavor_Text"] >> flavor_text S["real_name"] << real_name S["name_is_always_random"] << be_random_name S["body_is_always_random"] << be_random_body @@ -493,19 +465,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["cyborg_name"] << custom_names["cyborg"] S["religion_name"] << custom_names["religion"] S["deity_name"] << custom_names["deity"] - S["species"] << pref_species - //Custom - S["mutant_tail"] << mutant_tail - S["mutant_wing"] << mutant_wing - S["wingcolor"] << wingcolor - //S["special_color"] << special_color - S["be_taur"] << be_taur - S["vore_ability"] << vore_ability - S["vore_banned_methods"]<< vore_banned_methods - S["vore_extra_bans"] << vore_extra_bans - S["character_size"] << character_size - S["p_cock"] << p_cock - S["p_vagina"] << p_vagina //Jobs S["userandomjob"] << userandomjob @@ -535,4 +494,4 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car /client/verb/savefile_import(path as text) var/savefile/S = new /savefile(path) S.ImportText("/",file("[path].txt")) -*/ +*/ \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 60d1ee4780..25c3c5c449 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -298,46 +298,6 @@ var/datum/sprite_accessory/socks/U3 = socks_list[H.socks] if(U3) standing += image("icon"=U3.icon, "icon_state"="[U3.icon_state]_s", "layer"=-BODY_LAYER) - /* - //Custom Code - if(H.dna&&H.dna.taur&&!kpcode_cantaur(id))H.dna.taur=0//VERY BAD TEMP FIX - - if(H.underwear&&H.underwear!="Nude"&&H.underwear_active&& (!H.dna||!H.dna.taur) ) - var/datum/sprite_accessory/underwear/U = underwear_list[H.underwear] - if(U) - standing += image("icon"=U.icon, "icon_state"="[U.icon_state]_s", "layer"=-BODY_LAYER) - - else if((!H.dna || !H.dna.taur) && (!H.wear_suit || !(H.wear_suit.flags_inv&HIDEJUMPSUIT)) && (!H.w_uniform||!(H.w_uniform.body_parts_covered&GROIN)) ) - if(H.dna&&H.dna.cock) - //cock codes here - var/list/cock=H.dna.cock - var/cock_mod=0 - var/cock_type=cock["type"] - if(cock["has"]==H.dna.COCK_NORMAL)cock_mod="n" - else if(cock["has"]==H.dna.COCK_HYPER)cock_mod="h" - else if(cock["has"]==H.dna.COCK_DOUBLE)cock_mod="d" - if(cock_mod) - var/icon/chk=new/icon('icons/mob/cock.dmi') - var/list/available_states=chk.IconStates() - if(available_states.Find("[cock_type]_c_[cock_mod]")) - var/image/cockimtmp = image("icon"='icons/mob/cock.dmi', "icon_state"="[cock_type]_c_[cock_mod]", "layer"=-BODY_LAYER) - var/new_color = "#" + cock["color"] - cockimtmp.color = new_color - standing += cockimtmp - if(available_states.Find("[cock_type]_s_[cock_mod]")) - var/image/cockimtmp = image("icon"='icons/mob/cock.dmi', "icon_state"="[cock_type]_s_[cock_mod]", "layer"=-BODY_LAYER) - if(H.dna.special_color[2]) - var/new_color = "#" + H.dna.special_color[2] - cockimtmp.color = new_color - standing += cockimtmp - - if(H.dna&&H.dna.taur) - - var/taur_state="[kpcode_cantaur(H.dna.mutantrace())]_overlay" - if(H.vore_womb_datum.has_people()||H.vore_stomach_datum.has_people()) - taur_state+="_f" - standing += generate_colour_icon('icons/mob/special/taur.dmi',"[taur_state]",H.dna.special_color,offset_x=-16,add_layer=-BODY_LAYER) - */ if(standing.len) H.overlays_standing[BODY_LAYER] = standing @@ -371,6 +331,7 @@ if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT)) bodyparts_to_add -= "tail_human" + if("waggingtail_human" in mutant_bodyparts) if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT)) bodyparts_to_add -= "waggingtail_human" @@ -447,8 +408,6 @@ S = ears_list[H.dna.features["ears"]] if("body_markings") S = body_markings_list[H.dna.features["body_markings"]] - if("mam_body_markings") - S = mam_body_markings_list[H.dna.features["mam_body_markings"]] if("wings") S = wings_list[H.dna.features["wings"]] if("wingsopen") diff --git a/tgstation.dme b/tgstation.dme index 68a92acf5f..cff3c0ba62 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -126,17 +126,8 @@ #include "code\_onclick\hud\robot.dm" #include "code\_onclick\hud\screen_objects.dm" #include "code\_onclick\hud\swarmer.dm" -#include "code\citadel\chemistry.dm" -#include "code\citadel\flavour.dm" -#include "code\citadel\genetics.dm" -#include "code\citadel\macro.dm" -#include "code\citadel\panel.dm" -#include "code\citadel\races.dm" -#include "code\citadel\science.dm" -#include "code\citadel\transfer_release.dm" -#include "code\citadel\transformation.dm" -#include "code\citadel\unassigned.dm" -#include "code\citadel\whitelist.dm" +#include "code\citadel\_helpers.dm" +#include "code\citadel\organs.dm" #include "code\controllers\admin.dm" #include "code\controllers\configuration.dm" #include "code\controllers\controller.dm"