Reverts Slime/IPC Imitation Cosmetics (#28695)

* Initial commit

* Removes unused define

* oops
This commit is contained in:
Burzah
2025-04-03 10:17:35 -07:00
committed by GitHub
parent c3765a3db0
commit b642a271e1
29 changed files with 182 additions and 507 deletions
@@ -64,8 +64,7 @@
height,
cyborg_brain_type,
body_type,
pda_ringtone,
species_subtype
pda_ringtone
FROM characters WHERE ckey=:ckey"}, list(
"ckey" = C.ckey
))
+34 -72
View File
@@ -37,8 +37,6 @@
var/e_colour = "#000000" //Eye color
var/alt_head = "None" //Alt head style.
var/species = "Human"
/// Used for DNA species to allow select species to imitate / morph into different species.
var/species_subtype = "None"
var/language = "None" //Secondary language
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
/// If a spawned cyborg should have an MMI, a positronic, or a robobrain. MMI by default
@@ -204,8 +202,7 @@
runechat_color=:runechat_color,
cyborg_brain_type=:cyborg_brain_type,
body_type=:body_type,
pda_ringtone=:pda_ringtone,
species_subtype=:species_subtype
pda_ringtone=:pda_ringtone
WHERE ckey=:ckey
AND slot=:slot"}, list(
// OH GOD SO MANY PARAMETERS
@@ -269,7 +266,6 @@
"runechat_color" = runechat_color,
"cyborg_brain_type" = cyborg_brain_type,
"pda_ringtone" = pda_ringtone,
"species_subtype" = species_subtype,
"ckey" = C.ckey,
"slot" = slot_number
))
@@ -310,7 +306,7 @@
player_alt_titles,
disabilities, organ_data, rlimb_data, nanotrasen_relation, physique, height, speciesprefs,
socks, body_accessory, gear, autohiss,
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, pda_ringtone, species_subtype)
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, pda_ringtone)
VALUES
(:ckey, :slot, :metadata, :name, :be_random_name, :gender,
:age, :species, :language,
@@ -337,7 +333,7 @@
:playertitlelist,
:disabilities, :organ_list, :rlimb_list, :nanotrasen_relation, :physique, :height, :speciesprefs,
:socks, :body_accessory, :gearlist, :autohiss_mode,
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type, :pda_ringtone, :species_subtype)
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type, :pda_ringtone)
"}, list(
// This has too many params for anyone to look at this without going insae
"ckey" = C.ckey,
@@ -401,8 +397,7 @@
"custom_emotes" = json_encode(custom_emotes),
"runechat_color" = runechat_color,
"cyborg_brain_type" = cyborg_brain_type,
"pda_ringtone" = pda_ringtone,
"species_subtype" = species_subtype
"pda_ringtone" = pda_ringtone
))
if(!query.warn_execute())
@@ -497,7 +492,7 @@
cyborg_brain_type = query.item[59]
body_type = query.item[60]
pda_ringtone = query.item[61]
species_subtype = query.item[62]
//Sanitize
var/datum/species/SP = GLOB.all_species[species]
if(!SP)
@@ -511,9 +506,6 @@
species = "Human"
stack_trace("Character doesn't have a species, character name is [real_name]. Defaulting to human.")
if(isnull(species_subtype))
species_subtype = "None"
if(isnull(language))
language = "None"
@@ -833,74 +825,60 @@
var/icon/icobase
var/datum/species/current_species = GLOB.all_species[species]
var/will_slimify = FALSE
//Icon-based species colour.
var/coloured_tail
if(current_species)
var/mob/living/carbon/human/fake/H = new
H.dna.species = current_species
if(species_subtype != "None" && current_species.bodyflags & HAS_SPECIES_SUBTYPE)
var/datum/species/subtype_species = GLOB.all_species[species_subtype]
if(subtype_species) // Take certain attributes from our subtype to apply to our current species.
H.dna.species.updatespeciessubtype(H, subtype_species)
current_species = H.dna.species
icobase = current_species.icobase
else if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race.
if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race.
var/mob/living/carbon/human/fake/H = new
H.dna.species = current_species
H.s_tone = s_tone
H.dna.species.updatespeciescolor(H, 0) //The mob's species wasn't set, so it's almost certainly different than the character's species at the moment. Thus, we need to be owner-insensitive.
var/obj/item/organ/external/chest/C = H.get_organ("chest")
icobase = C.icobase ? C.icobase : C.dna.species.icobase
if(H.dna.species.bodyflags & HAS_TAIL)
coloured_tail = H.tail ? H.tail : H.dna.species.tail
qdel(H)
else
icobase = current_species.icobase
will_slimify = (istype(current_species, /datum/species/slime) && current_species.species_subtype != "None")
qdel(H)
else
icobase = 'icons/mob/human_races/r_human.dmi'
preview_icon = new /icon(icobase, "torso_[g]")
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
var/head = "head"
if(alt_head && current_species.bodyflags & HAS_ALT_HEADS)
var/datum/sprite_accessory/alt_heads/H = GLOB.alt_heads_list[alt_head]
if(H.icon_state)
head = H.icon_state
preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY)
for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand"))
if(organ_data[name] == "amputated")
continue
var/icon/bodypart = new /icon(icobase, "[name]")
if(name == "head") // Head nonsense.
var/head = "head"
if(alt_head && current_species.bodyflags & HAS_ALT_HEADS)
var/datum/sprite_accessory/alt_heads/H = GLOB.alt_heads_list[alt_head]
if(H.icon_state)
head = H.icon_state
bodypart = new /icon(icobase, "[head]_[g]") // head_state _ gender
if(name in list("chest", "groin")) // Groin and Chest nonsense
if(name == "chest")
name = "torso"
bodypart = new /icon(icobase, "[name]_[g]") // groin/torso _ gender
if(organ_data[name] == "cyborg") // Robotic limbs.
if(organ_data[name] == "cyborg")
var/datum/robolimb/R
if(rlimb_data[name]) R = GLOB.all_robolimbs[rlimb_data[name]]
if(!R) R = GLOB.basic_robolimb
if(rlimb_data[name])
R = GLOB.all_robolimbs[rlimb_data[name]]
if(!R)
R = GLOB.basic_robolimb
if(name == "chest")
name = "torso"
if(length(R.sprite_sheets) && R.sprite_sheets[current_species.sprite_sheet_name]) // Species specific augmented limbs
R.icon = R.sprite_sheets[current_species.sprite_sheet_name]
bodypart.Blend(new /icon(R.icon, "[name]"), ICON_OVERLAY)
preview_icon.Blend(bodypart, ICON_OVERLAY)
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
continue
if(will_slimify) // Applies to limbs that are not robotic.
bodypart.slimify(s_colour, "A0")
preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY)
// Skin color
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
preview_icon.Blend(s_colour, ICON_ADD)
// Skin tone
if(current_species && (current_species.bodyflags & HAS_SKIN_TONE))
if(s_tone >= 0)
preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
// Skin color
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
bodypart.Blend(s_colour, ICON_ADD)
// Skin tone
if(current_species && (current_species.bodyflags & HAS_SKIN_TONE))
if(s_tone >= 0)
bodypart.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
bodypart.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
preview_icon.Blend(bodypart, ICON_OVERLAY)
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
// Body accessory
if(current_species && (current_species.bodyflags & HAS_BODY_ACCESSORY))
@@ -941,10 +919,6 @@
t_marking_s.Blend(m_colours["tail"], ICON_ADD)
temp.Blend(t_marking_s, ICON_OVERLAY)
if(will_slimify)
temp.slimify(s_colour, "A0")
if(underlay)
underlay.slimify(s_colour, "A0")
// Body accessory has an underlay, add it too.
if(underlay)
ICON_SHIFT_XY(underlay, offset_x, offset_y)
@@ -961,8 +935,6 @@
if(body_marking_style && body_marking_style.species_allowed)
var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s")
b_marking_s.Blend(m_colours["body"], ICON_ADD)
if(will_slimify)
b_marking_s.slimify(s_colour, "A0")
preview_icon.Blend(b_marking_s, ICON_OVERLAY)
if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings.
var/head_marking = m_styles["head"]
@@ -970,8 +942,6 @@
if(head_marking_style && head_marking_style.species_allowed)
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
h_marking_s.Blend(m_colours["head"], ICON_ADD)
if(will_slimify)
h_marking_s.slimify(s_colour, "A0")
preview_icon.Blend(h_marking_s, ICON_OVERLAY)
var/icon/hands_icon = icon(preview_icon)
@@ -1018,8 +988,6 @@
if(head_accessory_style && head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
head_accessory_s.Blend(hacc_colour, ICON_ADD)
if(will_slimify)
head_accessory_s.slimify(s_colour, "A0")
face_s.Blend(head_accessory_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[f_style]
@@ -1880,16 +1848,10 @@
/datum/character_save/proc/copy_to(mob/living/carbon/human/character)
var/datum/species/S = GLOB.all_species[species]
character.set_species(S.type, delay_icon_update = TRUE) // Yell at me if this causes everything to melt
var/datum/species/subtype = GLOB.all_species[species_subtype]
if(!isnull(subtype))
character.dna.species.updatespeciessubtype(character, new subtype.type(), TRUE, FALSE)
else
character.species_subtype = "None"
if(be_random_name)
real_name = random_name(gender, species)
character.add_language(language)
character.real_name = real_name
character.dna.real_name = real_name
character.name = character.real_name
+76 -114
View File
@@ -3,13 +3,6 @@
return
var/datum/species/S = GLOB.all_species[active_character.species]
var/datum/species/subtype = GLOB.all_species[active_character.species_subtype]
if(isnull(subtype)) // Set the subtype to be the same as Species in the case we don't have one, saves alot of headaches when we're checking for valid markings etc.
subtype = S
else
S = new S.type()
S.bodyflags |= subtype.bodyflags // Used for finding valid styles.
S.species_subtype = subtype.name // Used for finding valid styles.
if(href_list["preference"] == "job")
switch(href_list["task"])
if("close")
@@ -204,33 +197,73 @@
to_chat(user, "<span class='warning'>Invalid species, please pick something else.</span>")
return
if(prev_species != active_character.species)
if(isnull(NS))
NS = GLOB.all_species[active_character.species]
S = new NS.type()
active_character.species_subtype = "None"
active_character.age = clamp(active_character.age, S.min_age, S.max_age)
subtype = GLOB.all_species[active_character.species_subtype] // Changing species resets subtype.
if(isnull(subtype))
subtype = GLOB.all_species[active_character.species]
subtype = new subtype.type()
reset_styles(S)
if("species_subtype")
if(S.bodyflags & HAS_SPECIES_SUBTYPE)
var/new_subtype = tgui_input_list(user, "Choose your character's species subtype:", "Character Preference", S.allowed_species_subtypes)
if(isnull(new_subtype) || active_character.species_subtype == new_subtype)
return
active_character.species_subtype = new_subtype
subtype = GLOB.all_species[active_character.species_subtype]
if(isnull(subtype))
subtype = GLOB.all_species[active_character.species]
subtype = new subtype.type()
S = new S.type() // Always make a new species before editing it, as datums get messy.
if(S.name != subtype.name)
S.bodyflags |= subtype.bodyflags // Add our body flags of the new subtype.
S.species_subtype = subtype.name
reset_styles(subtype, S)
active_character.age = clamp(active_character.age, NS.min_age, NS.max_age)
var/datum/robolimb/robohead
if(NS.bodyflags & ALL_RPARTS)
var/head_model = "[!active_character.rlimb_data["head"] ? "Morpheus Cyberkinetics" : active_character.rlimb_data["head"]]"
robohead = GLOB.all_robolimbs[head_model]
//grab one of the valid hair styles for the newly chosen species
active_character.h_style = random_hair_style(active_character.gender, active_character.species, robohead)
//grab one of the valid facial hair styles for the newly chosen species
active_character.f_style = random_facial_hair_style(active_character.gender, active_character.species, robohead)
if(NS.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
active_character.ha_style = random_head_accessory(active_character.species)
else
reset_styles(S)
active_character.ha_style = "None" // No Vulp ears on Unathi
active_character.hacc_colour = rand_hex_color()
if(NS.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
active_character.m_styles["head"] = random_marking_style("head", active_character.species, robohead, null, active_character.alt_head)
else
active_character.m_styles["head"] = "None"
active_character.m_colours["head"] = "#000000"
if(NS.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
active_character.m_styles["body"] = random_marking_style("body", active_character.species)
else
active_character.m_styles["body"] = "None"
active_character.m_colours["body"] = "#000000"
if(NS.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
active_character.m_styles["tail"] = random_marking_style("tail", active_character.species, null, active_character.body_accessory)
else
active_character.m_styles["tail"] = "None"
active_character.m_colours["tail"] = "#000000"
// Don't wear another species' underwear!
var/datum/sprite_accessory/SA = GLOB.underwear_list[active_character.underwear]
if(!SA || !(active_character.species in SA.species_allowed))
active_character.underwear = random_underwear(active_character.body_type, active_character.species)
SA = GLOB.undershirt_list[active_character.undershirt]
if(!SA || !(active_character.species in SA.species_allowed))
active_character.undershirt = random_undershirt(active_character.body_type, active_character.species)
SA = GLOB.socks_list[active_character.socks]
if(!SA || !(active_character.species in SA.species_allowed))
active_character.socks = random_socks(active_character.body_type, active_character.species)
//reset skin tone and colour
if(NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
random_skin_tone(active_character.species)
else
active_character.s_tone = 0
if(!(NS.bodyflags & HAS_SKIN_COLOR))
active_character.s_colour = "#000000"
active_character.alt_head = "None" //No alt heads on species that don't have them.
active_character.speciesprefs = 0 //My Vox tank shouldn't change how my future Grey talks.
active_character.body_accessory = random_body_accessory(NS.name, NS.optional_body_accessory)
//Reset prosthetics.
active_character.organ_data = list()
active_character.rlimb_data = list()
if(!(NS.autohiss_basic_map))
active_character.autohiss_mode = AUTOHISS_OFF
if("speciesprefs")
active_character.speciesprefs = !active_character.speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
if("language")
@@ -302,7 +335,7 @@
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
valid_hairstyles += hairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if((active_character.species in SA.species_allowed) || (subtype.name in SA.species_allowed)) //If the user's head is of a species the hairstyle allows, add it to the list.
if(active_character.species in SA.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle
sortTim(valid_hairstyles, GLOBAL_PROC_REF(cmp_text_asc)) //this alphabetizes the list
@@ -354,7 +387,7 @@
var/list/valid_head_accessory_styles = list()
for(var/head_accessory_style in GLOB.head_accessory_styles_list)
var/datum/sprite_accessory/H = GLOB.head_accessory_styles_list[head_accessory_style]
if(!(active_character.species in H.species_allowed) && !(subtype.name in H.species_allowed))
if(!(active_character.species in H.species_allowed))
continue
valid_head_accessory_styles += head_accessory_style
@@ -371,7 +404,7 @@
var/list/valid_alt_heads = list()
for(var/alternate_head in GLOB.alt_heads_list)
var/datum/sprite_accessory/alt_heads/head = GLOB.alt_heads_list[alternate_head]
if(!(active_character.species in head.species_allowed) && !(subtype.name in head.species_allowed))
if(!(active_character.species in head.species_allowed))
continue
valid_alt_heads += alternate_head
@@ -390,7 +423,7 @@
var/list/valid_markings = list()
for(var/markingstyle in GLOB.marking_styles_list)
var/datum/sprite_accessory/body_markings/head/M = GLOB.marking_styles_list[markingstyle]
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
if(!(active_character.species in M.species_allowed))
continue
if(M.marking_location != "head")
continue
@@ -435,7 +468,7 @@
var/list/valid_markings = list()
for(var/markingstyle in GLOB.marking_styles_list)
var/datum/sprite_accessory/M = GLOB.marking_styles_list[markingstyle]
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
if(!(active_character.species in M.species_allowed))
continue
if(M.marking_location != "body")
continue
@@ -460,7 +493,7 @@
var/datum/sprite_accessory/body_markings/tail/M = GLOB.marking_styles_list[markingstyle]
if(M.marking_location != "tail")
continue
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
if(!(active_character.species in M.species_allowed))
continue
if(!active_character.body_accessory)
if(M.tails_allowed)
@@ -491,7 +524,7 @@
var/datum/body_accessory/accessory = GLOB.body_accessory_by_name[B]
if(isnull(accessory)) // None
continue
if((active_character.species in accessory.allowed_species) || (subtype.name in accessory.allowed_species))
if(active_character.species in accessory.allowed_species)
possible_body_accessories += B
if(S.optional_body_accessory)
possible_body_accessories += "None" //the only null entry should be the "None" option
@@ -557,7 +590,7 @@
continue
if(active_character.body_type == FEMALE && SA.body_type == MALE)
continue
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
if(!(active_character.species in SA.species_allowed))
continue
valid_underwear[underwear] = GLOB.underwear_list[underwear]
sortTim(valid_underwear, GLOBAL_PROC_REF(cmp_text_asc))
@@ -569,7 +602,7 @@
var/list/valid_undershirts = list()
for(var/undershirt in GLOB.undershirt_list)
var/datum/sprite_accessory/SA = GLOB.undershirt_list[undershirt]
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
if(!(active_character.species in SA.species_allowed))
continue
if(active_character.body_type == MALE && SA.body_type == FEMALE)
continue
@@ -586,7 +619,7 @@
var/list/valid_sockstyles = list()
for(var/sockstyle in GLOB.socks_list)
var/datum/sprite_accessory/SA = GLOB.socks_list[sockstyle]
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
if(!(active_character.species in SA.species_allowed))
continue
if(active_character.body_type == MALE && SA.body_type == FEMALE)
continue
@@ -1280,74 +1313,3 @@
ShowChoices(user)
return TRUE
/// Reset the styles what is available to the NS (new species) parameter. Parent Species is for subtype changing.
/datum/preferences/proc/reset_styles(datum/species/NS, datum/species/parent_species)
var/datum/robolimb/robohead
if(!isnull(parent_species))
NS.bodyflags |= parent_species.bodyflags
if(NS.bodyflags & ALL_RPARTS)
var/head_model = "[!active_character.rlimb_data["head"] ? "Morpheus Cyberkinetics" : active_character.rlimb_data["head"]]"
robohead = GLOB.all_robolimbs[head_model]
//grab one of the valid hair styles for the newly chosen species
active_character.h_style = random_hair_style(active_character.gender, NS.name, robohead)
//grab one of the valid facial hair styles for the newly chosen species
active_character.f_style = random_facial_hair_style(active_character.gender, NS.name, robohead)
if(NS.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
active_character.ha_style = random_head_accessory(NS.name)
else
active_character.ha_style = "None" // No Vulp ears on Unathi
active_character.hacc_colour = rand_hex_color()
if(NS.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
active_character.m_styles["head"] = random_marking_style("head", NS.name, robohead, null, active_character.alt_head)
else
active_character.m_styles["head"] = "None"
active_character.m_colours["head"] = "#000000"
if(NS.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
active_character.m_styles["body"] = random_marking_style("body", NS.name)
else
active_character.m_styles["body"] = "None"
active_character.m_colours["body"] = "#000000"
if(NS.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
active_character.m_styles["tail"] = random_marking_style("tail", NS.name, null, active_character.body_accessory)
else
active_character.m_styles["tail"] = "None"
active_character.m_colours["tail"] = "#000000"
// Don't wear another species' underwear!
var/datum/sprite_accessory/SA = GLOB.underwear_list[active_character.underwear]
if(!SA || !(NS.name in SA.species_allowed))
active_character.underwear = random_underwear(active_character.body_type, NS.name)
SA = GLOB.undershirt_list[active_character.undershirt]
if(!SA || !(NS.name in SA.species_allowed))
active_character.undershirt = random_undershirt(active_character.body_type, NS.name)
SA = GLOB.socks_list[active_character.socks]
if(!SA || !(NS.name in SA.species_allowed))
active_character.socks = random_socks(active_character.body_type, NS.name)
//reset skin tone and colour
if(NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
random_skin_tone(NS.name)
else
active_character.s_tone = 0
if(!(NS.bodyflags & HAS_SKIN_COLOR))
active_character.s_colour = "#000000"
active_character.alt_head = "None" //No alt heads on species that don't have them.
active_character.speciesprefs = 0 //My Vox tank shouldn't change how my future Grey talks.
active_character.body_accessory = random_body_accessory(NS.name, NS.optional_body_accessory)
//Reset prosthetics.
active_character.organ_data = list()
active_character.rlimb_data = list()
if(!(NS.autohiss_basic_map))
active_character.autohiss_mode = AUTOHISS_OFF
@@ -182,11 +182,6 @@ GLOBAL_LIST_INIT(special_role_times, list(
switch(current_tab)
if(TAB_CHAR) // Character Settings
var/datum/species/S = GLOB.all_species[active_character.species]
var/datum/species/subtype = GLOB.all_species[active_character.species_subtype]
if(istype(S) && istype(subtype))
subtype = new subtype.type()
S = new S.type()
S.bodyflags |= subtype.bodyflags
if(!istype(S)) //The species was invalid. Set the species to the default, fetch the datum for that species and generate a random character.
active_character.species = initial(active_character.species)
S = GLOB.all_species[active_character.species]
@@ -212,8 +207,6 @@ GLOBAL_LIST_INIT(special_role_times, list(
dat += "<b>Age:</b> <a href='byond://?_src_=prefs;preference=age;task=input'>[active_character.age]</a><br>"
dat += "<b>Body:</b> <a href='byond://?_src_=prefs;preference=all;task=random'>(Randomize)</a><br>"
dat += "<b>Species:</b> <a href='byond://?_src_=prefs;preference=species;task=input'>[active_character.species]</a><br>"
if(S.bodyflags & HAS_SPECIES_SUBTYPE)
dat += "<b>Species Sub-Type:</b> <a href='byond://?_src_=prefs;preference=species_subtype;task=input'>[active_character.species_subtype]</a><br>"
dat += "<b>Gender:</b> <a href='byond://?_src_=prefs;preference=gender'>[active_character.gender == MALE ? "Male" : (active_character.gender == FEMALE ? "Female" : "Genderless")]</a><br>"
dat += "<b>Body Type:</b> <a href='byond://?_src_=prefs;preference=body_type'>[active_character.body_type == MALE ? "Masculine" : "Feminine"]</a>"
dat += "<br>"