diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index a65a57a345c..d967b5cc2cf 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -175,10 +175,10 @@ proc/get_id_photo(var/mob/living/carbon/human/H) //Horns if(H.species.bodyflags & HAS_HORNS) - var/datum/sprite_accessory/horns = horn_styles_list[H.horns] - if(horns) - var/icon/horns_s = new/icon("icon" = horns.icon, "icon_state" = "[horns.icon_state]_s") - horns_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD) + var/datum/sprite_accessory/horn_style = horn_styles_list[H.hn_style] + if(horn_style) + var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s") + horns_s.Blend(rgb(H.r_horns, H.g_horns, H.b_horns), ICON_ADD) eyes_s.Blend(horns_s, ICON_OVERLAY) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style] diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 57e56808de6..0e1c731e428 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -110,7 +110,10 @@ datum/preferences var/undershirt = "Nude" //undershirt type var/socks = "Nude" //socks type var/backbag = 2 //backpack type - var/horns = "None" //Horn style + var/hn_style = "None" //Horn style + var/r_horns = 0 //Horn colour + var/g_horns = 0 //Horn colour + var/b_horns = 0 //Horn colour var/m_style = "None" //Marking style var/r_markings = 0 //Marking colour var/g_markings = 0 //Marking colour @@ -360,7 +363,8 @@ datum/preferences if(species == "Unathi") //Species that have horns. dat += "
Horns
" - dat += "Style: [horns]
" + dat += "Change Color
__
" + dat += "Style: [hn_style]
" dat += "
Body Markings
" dat += "Change Color
__
" @@ -1201,21 +1205,32 @@ datum/preferences if(new_h_style) h_style = new_h_style + if("horns") - var/list/valid_hornstyles = list() - for(var/hornstyle in horn_styles_list) - var/datum/sprite_accessory/H = horn_styles_list[hornstyle] - if( !(species in H.species_allowed)) - continue + if(species == "Unathi") // Species with horns + var/input = "Choose the colour of your your character's horns:" + var/new_horns = input(user, input, "Character Preference", rgb(r_horns, g_horns, b_horns)) as color|null + if(new_horns) + r_horns = hex2num(copytext(new_horns, 2, 4)) + g_horns = hex2num(copytext(new_horns, 4, 6)) + b_horns = hex2num(copytext(new_horns, 6, 8)) - valid_hornstyles[hornstyle] = horn_styles_list[hornstyle] + if("hn_style") + if(species == "Unathi") // Species with horns + var/list/valid_hornstyles = list() + for(var/hornstyle in horn_styles_list) + var/datum/sprite_accessory/H = horn_styles_list[hornstyle] + if( !(species in H.species_allowed)) + continue - var/new_horn_style = input(user, "Choose your character's horn style:", "Character Preference") as null|anything in valid_hornstyles - if(new_horn_style) - horns = new_horn_style + valid_hornstyles[hornstyle] = horn_styles_list[hornstyle] + + var/new_horn_style = input(user, "Choose your character's horn style:", "Character Preference") as null|anything in valid_hornstyles + if(new_horn_style) + hn_style = new_horn_style if("markings") - if(species == "Unathi") + if(species == "Unathi") // Species with markings var/input = "Choose the colour of your your character's body markings:" var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null if(new_markings) @@ -1224,17 +1239,18 @@ datum/preferences b_markings = hex2num(copytext(new_markings, 6, 8)) if("m_style") - var/list/valid_markings = list() - for(var/markingstyle in marking_styles_list) - var/datum/sprite_accessory/M = marking_styles_list[markingstyle] - if( !(species in M.species_allowed)) - continue + if(species == "Unathi") // Species with markings + var/list/valid_markings = list() + for(var/markingstyle in marking_styles_list) + var/datum/sprite_accessory/M = marking_styles_list[markingstyle] + if( !(species in M.species_allowed)) + continue - valid_markings[markingstyle] = marking_styles_list[markingstyle] + valid_markings[markingstyle] = marking_styles_list[markingstyle] - var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings - if(new_marking_style) - m_style = new_marking_style + var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings + if(new_marking_style) + m_style = new_marking_style if("body_accessory") var/list/possible_body_accessories = list() @@ -1656,7 +1672,10 @@ datum/preferences character.socks = socks if(character.species.bodyflags & HAS_HORNS) - character.horns = horns + character.r_horns = r_horns + character.g_horns = g_horns + character.b_horns = b_horns + character.hn_style = hn_style if(character.species.bodyflags & HAS_MARKINGS) character.r_markings = r_markings character.g_markings = g_markings diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm deleted file mode 100644 index b0f6524b085..00000000000 --- a/code/modules/client/preferences_savefile.dm +++ /dev/null @@ -1,453 +0,0 @@ -#define SAVEFILE_VERSION_MIN 8 -#define SAVEFILE_VERSION_MAX 12 - -//handles converting savefiles to new formats -//MAKE SURE YOU KEEP THIS UP TO DATE! -//If the sanity checks are capable of handling any issues. Only increase SAVEFILE_VERSION_MAX, -//this will mean that savefile_version will still be over SAVEFILE_VERSION_MIN, meaning -//this savefile update doesn't run everytime we load from the savefile. -//This is mainly for format changes, such as the bitflags in toggles changing order or something. -//if a file can't be updated, return 0 to delete it and start again -//if a file was updated, return 1 -/datum/preferences/proc/savefile_update() - if(savefile_version < 8) //lazily delete everything + additional files so they can be saved in the new format - for(var/ckey in preferences_datums) - var/datum/preferences/D = preferences_datums[ckey] - if(D == src) - var/delpath = "data/player_saves/[copytext(ckey,1,2)]/[ckey]/" - if(delpath && fexists(delpath)) - fdel(delpath) - break - return 0 - - if(savefile_version == SAVEFILE_VERSION_MAX) //update successful. - save_preferences() - save_character() - return 1 - return 0 - -/datum/preferences/proc/load_path(ckey,filename="preferences.sav") - if(!ckey) return - path = "data/player_saves/[copytext(ckey,1,2)]/[ckey]/[filename]" - savefile_version = SAVEFILE_VERSION_MAX - -/* -/datum/preferences/proc/load_preferences() - if(!path) return 0 - if(!fexists(path)) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = "/" - - S["version"] >> savefile_version - //Conversion - if(!savefile_version || !isnum(savefile_version) || savefile_version < SAVEFILE_VERSION_MIN || savefile_version > SAVEFILE_VERSION_MAX) - if(!savefile_update()) //handles updates - savefile_version = SAVEFILE_VERSION_MAX - save_preferences() - save_character() - return 0 - - //general preferences - S["ooccolor"] >> ooccolor - S["lastchangelog"] >> lastchangelog - S["UI_style"] >> UI_style - S["be_special"] >> be_special - S["default_slot"] >> default_slot - S["toggles"] >> toggles - S["sound"] >> sound - S["UI_style_color"] >> UI_style_color - S["UI_style_alpha"] >> UI_style_alpha - S["randomslot"] >> randomslot - S["volume"] >> volume - //Sanitize - ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor)) - lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) - UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style)) - be_special = sanitize_integer(be_special, 0, 65535, initial(be_special)) - default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) - toggles = sanitize_integer(toggles, 0, 65535, initial(toggles)) - sound = sanitize_integer(sound, 0, 65535, initial(toggles)) - UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color)) - UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha)) - randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot)) - volume = sanitize_integer(volume, 0, 100, initial(volume)) - return 1 - -/datum/preferences/proc/save_preferences() - if(!path) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = "/" - - S["version"] << savefile_version - - //general preferences - S["ooccolor"] << ooccolor - S["lastchangelog"] << lastchangelog - S["UI_style"] << UI_style - S["be_special"] << be_special - S["default_slot"] << default_slot - S["toggles"] << toggles - S["sound"] << sound - S["UI_style_color"] << UI_style_color - S["UI_style_alpha"] << UI_style_alpha - S["randomslot"] << randomslot - S["volume"] << volume - return 1 - - -//saving volume changes -/datum/preferences/proc/save_volume() - if(!path) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = "/" - - S["volume"] << volume - return 1 -*/ - -/datum/preferences/proc/load_save(dir) - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = dir - - //Character - S["OOC_Notes"] >> metadata - S["real_name"] >> real_name - S["name_is_always_random"] >> be_random_name - S["gender"] >> gender - S["age"] >> age - S["species"] >> species - S["language"] >> language - S["spawnpoint"] >> spawnpoint - - //colors to be consolidated into hex strings (requires some work with dna code) - S["markings_red"] >> r_markings - S["markings_green"] >> g_markings - S["markings_blue"] >> b_markings - S["hair_red"] >> r_hair - S["hair_green"] >> g_hair - S["hair_blue"] >> b_hair - S["facial_red"] >> r_facial - S["facial_green"] >> g_facial - S["facial_blue"] >> b_facial - S["skin_tone"] >> s_tone - S["skin_red"] >> r_skin - S["skin_green"] >> g_skin - S["skin_blue"] >> b_skin - S["horn_style_name"] >> horns - S["marking_style_name"] >> m_style - S["hair_style_name"] >> h_style - S["facial_style_name"] >> f_style - S["eyes_red"] >> r_eyes - S["eyes_green"] >> g_eyes - S["eyes_blue"] >> b_eyes - S["underwear"] >> underwear - S["undershirt"] >> undershirt - S["socks"] >> socks - S["backbag"] >> backbag - S["b_type"] >> b_type - S["accent"] >> accent - S["voice"] >> voice - S["pitch"] >> pitch - S["talkspeed"] >> talkspeed - - //Jobs - S["alternate_option"] >> alternate_option - S["job_civilian_high"] >> job_civilian_high - S["job_civilian_med"] >> job_civilian_med - S["job_civilian_low"] >> job_civilian_low - S["job_medsci_high"] >> job_medsci_high - S["job_medsci_med"] >> job_medsci_med - S["job_medsci_low"] >> job_medsci_low - S["job_engsec_high"] >> job_engsec_high - S["job_engsec_med"] >> job_engsec_med - S["job_engsec_low"] >> job_engsec_low - S["job_karma_high"] >> job_karma_high - S["job_karma_med"] >> job_karma_med - S["job_karma_low"] >> job_karma_low - - //Miscellaneous - S["flavor_text"] >> flavor_text - S["med_record"] >> med_record - S["sec_record"] >> sec_record - S["gen_record"] >> gen_record - S["be_special"] >> be_special - S["disabilities"] >> disabilities - S["player_alt_titles"] >> player_alt_titles - S["organ_data"] >> organ_data - - S["nanotrasen_relation"] >> nanotrasen_relation - //S["skin_style"] >> skin_style - - //Sanitize - metadata = sanitize_text(metadata, initial(metadata)) - real_name = reject_bad_name(real_name) - if(isnull(species)) species = "Human" - if(isnull(language)) language = "None" - if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation) - if(!real_name) real_name = random_name(gender,species) - be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) - gender = sanitize_gender(gender) - age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) - r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings)) - g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings)) - b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings)) - r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair)) - g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair)) - b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair)) - r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial)) - g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial)) - b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial)) - s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone)) - r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin)) - g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin)) - b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin)) - horns = sanitize_inlist(horns, horn_styles_list, initial(horns)) - m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style)) - h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style)) - f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style)) - r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes)) - g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes)) - b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes)) - underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear)) - undershirt = sanitize_integer(undershirt, 1, undershirt_t.len, initial(undershirt)) - socks = sanitize_integer(socks,1 socks_t.len, initial(socks)) - backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag)) - b_type = sanitize_text(b_type, initial(b_type)) - accent = sanitize_text(accent, initial(accent)) - voice = sanitize_text(voice, initial(voice)) - pitch = sanitize_text(pitch, initial(pitch)) - talkspeed = sanitize_text(talkspeed, initial(talkspeed)) - - alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option)) - job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high)) - job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med)) - job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low)) - job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high)) - job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med)) - job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low)) - job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high)) - job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med)) - job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low)) - job_karma_high = sanitize_integer(job_karma_high, 0, 65535, initial(job_karma_high)) - job_karma_med = sanitize_integer(job_karma_med, 0, 65535, initial(job_karma_med)) - job_karma_low = sanitize_integer(job_karma_low, 0, 65535, initial(job_karma_low)) - - if(isnull(disabilities)) disabilities = 0 - if(!player_alt_titles) player_alt_titles = new() - if(!organ_data) src.organ_data = list() - //if(!skin_style) skin_style = "Default" - -/datum/preferences/proc/random_character() - if(!path) return 0 - if(!fexists(path)) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - var/list/saves = list() - var/name - for(var/i=1, i<=MAX_SAVE_SLOTS, i++) - S.cd = "/character[i]" - S["real_name"] >> name - if(!name) continue - saves.Add(S.cd) - - if(!saves.len) - load_character() - return 0 - S.cd = pick(saves) - load_save(S.cd) - return 1 -/* -/datum/preferences/proc/load_character(slot) - if(!path) return 0 - if(!fexists(path)) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = "/" - if(!slot) slot = default_slot - slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) - if(slot != default_slot) - default_slot = slot - S["default_slot"] << slot - S.cd = "/character[slot]" - load_save(S.cd) - Now loaded by proc load_save(S.cd) - //Character - S["OOC_Notes"] >> metadata - S["real_name"] >> real_name - S["name_is_always_random"] >> be_random_name - S["gender"] >> gender - S["age"] >> age - S["species"] >> species - S["language"] >> language - - //colors to be consolidated into hex strings (requires some work with dna code) - S["hair_red"] >> r_hair - S["hair_green"] >> g_hair - S["hair_blue"] >> b_hair - S["facial_red"] >> r_facial - S["facial_green"] >> g_facial - S["facial_blue"] >> b_facial - S["skin_tone"] >> s_tone - S["skin_red"] >> r_skin - S["skin_green"] >> g_skin - S["skin_blue"] >> b_skin - S["hair_style_name"] >> h_style - S["facial_style_name"] >> f_style - S["eyes_red"] >> r_eyes - S["eyes_green"] >> g_eyes - S["eyes_blue"] >> b_eyes - S["underwear"] >> underwear - S["undershirt"] >> undershirt - S["backbag"] >> backbag - S["b_type"] >> b_type - - //Jobs - S["alternate_option"] >> alternate_option - S["job_civilian_high"] >> job_civilian_high - S["job_civilian_med"] >> job_civilian_med - S["job_civilian_low"] >> job_civilian_low - S["job_medsci_high"] >> job_medsci_high - S["job_medsci_med"] >> job_medsci_med - S["job_medsci_low"] >> job_medsci_low - S["job_engsec_high"] >> job_engsec_high - S["job_engsec_med"] >> job_engsec_med - S["job_engsec_low"] >> job_engsec_low - - //Miscellaneous - S["flavor_text"] >> flavor_text - S["med_record"] >> med_record - S["sec_record"] >> sec_record - S["gen_record"] >> gen_record - S["be_special"] >> be_special - S["disabilities"] >> disabilities - S["player_alt_titles"] >> player_alt_titles - S["organ_data"] >> organ_data - - S["nanotrasen_relation"] >> nanotrasen_relation - //S["skin_style"] >> skin_style - - - //Sanitize - metadata = sanitize_text(metadata, initial(metadata)) - real_name = reject_bad_name(real_name) - if(isnull(species)) species = "Human" - if(isnull(language)) language = "None" - if(isnull(spawnpoint)) spawnpoint = "Arrivals Shuttle" - if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation) - if(!real_name) real_name = random_name(gender) - be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) - gender = sanitize_gender(gender) - age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) - r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair)) - g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair)) - b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair)) - r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial)) - g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial)) - b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial)) - s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone)) - r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin)) - g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin)) - b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin)) - h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style)) - f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style)) - r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes)) - g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes)) - b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes)) - underwear = sanitize_integer(underwear, 1, underwear_m.len, initial(underwear)) - undershirt = sanitize_integer(undershirt, 1, undershirt_t.len, initial(undershirt)) - backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag)) - b_type = sanitize_text(b_type, initial(b_type)) - - alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option)) - job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high)) - job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med)) - job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low)) - job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high)) - job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med)) - job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low)) - job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high)) - job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med)) - job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low)) - - if(isnull(disabilities)) disabilities = 0 - if(!player_alt_titles) player_alt_titles = new() - if(!organ_data) src.organ_data = list() - //if(!skin_style) skin_style = "Default" - - return 1 - -/datum/preferences/proc/save_character() - if(!path) return 0 - var/savefile/S = new /savefile(path) - if(!S) return 0 - S.cd = "/character[default_slot]" - - //Character - S["OOC_Notes"] << metadata - S["real_name"] << real_name - S["name_is_always_random"] << be_random_name - S["gender"] << gender - S["age"] << age - S["species"] << species - S["language"] << language - S["hair_red"] << r_hair - S["hair_green"] << g_hair - S["hair_blue"] << b_hair - S["facial_red"] << r_facial - S["facial_green"] << g_facial - S["facial_blue"] << b_facial - S["skin_tone"] << s_tone - S["skin_red"] << r_skin - S["skin_green"] << g_skin - S["skin_blue"] << b_skin - S["hair_style_name"] << h_style - S["facial_style_name"] << f_style - S["eyes_red"] << r_eyes - S["eyes_green"] << g_eyes - S["eyes_blue"] << b_eyes - S["underwear"] << underwear - S["undershirt"] << undershirt - S["backbag"] << backbag - S["b_type"] << b_type - S["accent"] << accent - S["voice"] << voice - S["pitch"] << pitch - S["talkspeed"] << talkspeed - - //Jobs - S["alternate_option"] << alternate_option - S["job_civilian_high"] << job_civilian_high - S["job_civilian_med"] << job_civilian_med - S["job_civilian_low"] << job_civilian_low - S["job_medsci_high"] << job_medsci_high - S["job_medsci_med"] << job_medsci_med - S["job_medsci_low"] << job_medsci_low - S["job_engsec_high"] << job_engsec_high - S["job_engsec_med"] << job_engsec_med - S["job_engsec_low"] << job_engsec_low - S["job_karma_high"] << job_karma_high - S["job_karma_med"] << job_karma_med - S["job_karma_low"] << job_karma_low - - //Miscellaneous - S["flavor_text"] << flavor_text - S["med_record"] << med_record - S["sec_record"] << sec_record - S["gen_record"] << gen_record - S["player_alt_titles"] << player_alt_titles - S["be_special"] << be_special - S["disabilities"] << disabilities - S["organ_data"] << organ_data - - S["nanotrasen_relation"] << nanotrasen_relation - //S["skin_style"] << skin_style - - return 1 -*/ - -#undef SAVEFILE_VERSION_MAX -#undef SAVEFILE_VERSION_MIN diff --git a/code/modules/mob/living/carbon/human/body_accessories.dm b/code/modules/mob/living/carbon/human/body_accessories.dm index f9450c457ee..ca94bd49baf 100644 --- a/code/modules/mob/living/carbon/human/body_accessories.dm +++ b/code/modules/mob/living/carbon/human/body_accessories.dm @@ -128,53 +128,3 @@ var/global/list/body_accessory_by_species = list("None" = null) icon_state = "vulptail5" animated_icon_state = "vulptail5_a" allowed_species = list("Vulpkanin") - -//Unathi -/datum/body_accessory/tail/unathi_2 - name = "Unathi Alt 1 (Smooth)" - - icon_state = "liztail2" - animated_icon_state = "liztail2_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_3 - name = "Unathi Alt 2 (Light)" - - icon_state = "liztail3" - animated_icon_state = "liztail3_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_4 - name = "Unathi Alt 3 (Dark Stripe)" - - icon_state = "liztail4" - animated_icon_state = "liztail4_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_5 - name = "Unathi Alt 4 (Light Stripe)" - - icon_state = "liztail5" - animated_icon_state = "liztail5_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_6 - name = "Unathi Alt 5 (Dark Tiger)" - - icon_state = "liztail6" - animated_icon_state = "liztail6_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_7 - name = "Unathi Alt 6 (Light Tiger)" - - icon_state = "liztail7" - animated_icon_state = "liztail7_a" - allowed_species = list("Unathi") - -/datum/body_accessory/tail/unathi_8 - name = "Unathi Alt 7 (Aquatic)" - - icon_state = "liztail8" - animated_icon_state = "liztail8_a" - allowed_species = list("Unathi") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index a75b1ab7bb5..65d4002c7d3 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -15,7 +15,10 @@ var/h_style = "Bald" //Horns - var/horns = "None" + var/r_horns = 0 + var/g_horns = 0 + var/b_horns = 0 + var/hn_style = "None" //Facial hair colour and style var/r_facial = 0 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 3f01c0937da..da3e0af38f2 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -408,13 +408,13 @@ var/global/list/damage_icon_parts = list() //base icons var/icon/horns_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HORNS))) - var/datum/sprite_accessory/horn_style = horn_styles_list[horns] + if(hn_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HORNS))) + var/datum/sprite_accessory/horn_style = horn_styles_list[hn_style] if(horn_style && horn_style.species_allowed) if(src.species.name in horn_style.species_allowed) var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s") if(horn_style.do_colouration) - horns_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) + horns_s.Blend(rgb(r_horns, g_horns, b_horns), ICON_ADD) horns_standing.Blend(horns_s, ICON_OVERLAY) else //warning("Invalid horns for [species.name]: [horns]") diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index b8cc06da85b..1b217dcf23a 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -269,7 +269,7 @@ datum/preferences //Horns if(current_species && (current_species.bodyflags & HAS_HORNS)) - var/datum/sprite_accessory/horn_style = horn_styles_list[horns] + var/datum/sprite_accessory/horn_style = horn_styles_list[hn_style] if(horn_style) var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s") horns_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) diff --git a/icons/mob/body_accessory.dmi b/icons/mob/body_accessory.dmi index dc91d47685f..b66a22cd08a 100644 Binary files a/icons/mob/body_accessory.dmi and b/icons/mob/body_accessory.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index 2501df9741f..34f7669cc85 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ