mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Slime People and IPC; Imitating Species Cosmetically. (#27359)
* Pain * More transparency / alpha * Vulp + Name override * more transparency alpha stuff * Reworks species subtype for slimepeople * Iteration 3... * Me when initial * 60 - 61 * Character.dm select query changes. * 61-62 * The real 61-62 * Update to IPC imitation * +63-64.sql > species_subtype after pda_ringtone IPC identity configuration surgery. Slime "Morph" action: 10 seconds. Allows a slime person to change how they look. > Same cost as regenerating a limb. Link processing subspecies implement. * Pain2 * SQL * Frankenstein monster fix * Slimify! ...no longer applies to robotic limbs. * 220 Alpha to 200 * Ordering issue fix. * Last ordering issue. * aa review, paradise_schema.sql * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> --------- Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
@@ -64,7 +64,8 @@
|
||||
height,
|
||||
cyborg_brain_type,
|
||||
body_type,
|
||||
pda_ringtone
|
||||
pda_ringtone,
|
||||
species_subtype
|
||||
FROM characters WHERE ckey=:ckey"}, list(
|
||||
"ckey" = C.ckey
|
||||
))
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
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
|
||||
@@ -202,7 +204,8 @@
|
||||
runechat_color=:runechat_color,
|
||||
cyborg_brain_type=:cyborg_brain_type,
|
||||
body_type=:body_type,
|
||||
pda_ringtone=:pda_ringtone
|
||||
pda_ringtone=:pda_ringtone,
|
||||
species_subtype=:species_subtype
|
||||
WHERE ckey=:ckey
|
||||
AND slot=:slot"}, list(
|
||||
// OH GOD SO MANY PARAMETERS
|
||||
@@ -266,6 +269,7 @@
|
||||
"runechat_color" = runechat_color,
|
||||
"cyborg_brain_type" = cyborg_brain_type,
|
||||
"pda_ringtone" = pda_ringtone,
|
||||
"species_subtype" = species_subtype,
|
||||
"ckey" = C.ckey,
|
||||
"slot" = slot_number
|
||||
))
|
||||
@@ -306,7 +310,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)
|
||||
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, pda_ringtone, species_subtype)
|
||||
VALUES
|
||||
(:ckey, :slot, :metadata, :name, :be_random_name, :gender,
|
||||
:age, :species, :language,
|
||||
@@ -333,7 +337,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)
|
||||
: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)
|
||||
"}, list(
|
||||
// This has too many params for anyone to look at this without going insae
|
||||
"ckey" = C.ckey,
|
||||
@@ -397,7 +401,8 @@
|
||||
"custom_emotes" = json_encode(custom_emotes),
|
||||
"runechat_color" = runechat_color,
|
||||
"cyborg_brain_type" = cyborg_brain_type,
|
||||
"pda_ringtone" = pda_ringtone
|
||||
"pda_ringtone" = pda_ringtone,
|
||||
"species_subtype" = species_subtype
|
||||
))
|
||||
|
||||
if(!query.warn_execute())
|
||||
@@ -422,7 +427,6 @@
|
||||
age = text2num(query.item[5])
|
||||
species = query.item[6]
|
||||
language = query.item[7]
|
||||
|
||||
h_colour = query.item[8]
|
||||
h_sec_colour = query.item[9]
|
||||
f_colour = query.item[10]
|
||||
@@ -493,7 +497,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)
|
||||
@@ -507,6 +511,9 @@
|
||||
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"
|
||||
|
||||
@@ -830,53 +837,65 @@
|
||||
//Icon-based species colour.
|
||||
var/coloured_tail
|
||||
if(current_species)
|
||||
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
|
||||
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
|
||||
else if(current_species.bodyflags & HAS_ICON_SKIN_TONE) //Handling species-specific icon-based skin tones by flagged race.
|
||||
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
|
||||
icobase = current_species.icobase
|
||||
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
|
||||
if(organ_data[name] == "cyborg")
|
||||
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.
|
||||
var/datum/robolimb/R
|
||||
if(rlimb_data[name]) R = GLOB.all_robolimbs[rlimb_data[name]]
|
||||
if(!R) R = GLOB.basic_robolimb
|
||||
if(name == "chest")
|
||||
name = "torso"
|
||||
preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic.
|
||||
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)
|
||||
continue
|
||||
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)
|
||||
if(istype(current_species, /datum/species/slime) && current_species.species_subtype != "None") // Applies to limbs that are not robotic.
|
||||
bodypart.GrayScale()
|
||||
bodypart.Blend("[s_colour]DC", ICON_AND) //DC = 220 alpha.
|
||||
else
|
||||
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
// 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)
|
||||
|
||||
// Body accessory
|
||||
if(current_species && (current_species.bodyflags & HAS_BODY_ACCESSORY))
|
||||
@@ -1831,6 +1850,11 @@
|
||||
/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)
|
||||
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
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.bodyflags |= subtype.bodyflags
|
||||
if(href_list["preference"] == "job")
|
||||
switch(href_list["task"])
|
||||
if("close")
|
||||
@@ -197,73 +202,20 @@
|
||||
to_chat(user, "<span class='warning'>Invalid species, please pick something else.</span>")
|
||||
return
|
||||
if(prev_species != active_character.species)
|
||||
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
|
||||
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
|
||||
S = NS
|
||||
active_character.age = clamp(active_character.age, S.min_age, S.max_age)
|
||||
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
|
||||
var/datum/species/NS = GLOB.all_species[active_character.species_subtype]
|
||||
if(isnull(NS))
|
||||
NS = GLOB.all_species[active_character.species]
|
||||
subtype = NS
|
||||
reset_styles(subtype, S)
|
||||
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")
|
||||
@@ -335,7 +287,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) //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) || (subtype.name 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
|
||||
@@ -387,7 +339,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))
|
||||
if(!(active_character.species in H.species_allowed) && !(subtype.name in H.species_allowed))
|
||||
continue
|
||||
|
||||
valid_head_accessory_styles += head_accessory_style
|
||||
@@ -404,7 +356,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))
|
||||
if(!(active_character.species in head.species_allowed) && !(subtype.name in head.species_allowed))
|
||||
continue
|
||||
|
||||
valid_alt_heads += alternate_head
|
||||
@@ -423,7 +375,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))
|
||||
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
|
||||
continue
|
||||
if(M.marking_location != "head")
|
||||
continue
|
||||
@@ -468,7 +420,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))
|
||||
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
|
||||
continue
|
||||
if(M.marking_location != "body")
|
||||
continue
|
||||
@@ -493,7 +445,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))
|
||||
if(!(active_character.species in M.species_allowed) && !(subtype.name in M.species_allowed))
|
||||
continue
|
||||
if(!active_character.body_accessory)
|
||||
if(M.tails_allowed)
|
||||
@@ -524,7 +476,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)
|
||||
if((active_character.species in accessory.allowed_species) || (subtype.name 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
|
||||
@@ -590,7 +542,7 @@
|
||||
continue
|
||||
if(active_character.body_type == FEMALE && SA.body_type == MALE)
|
||||
continue
|
||||
if(!(active_character.species in SA.species_allowed))
|
||||
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
|
||||
continue
|
||||
valid_underwear[underwear] = GLOB.underwear_list[underwear]
|
||||
sortTim(valid_underwear, GLOBAL_PROC_REF(cmp_text_asc))
|
||||
@@ -602,7 +554,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))
|
||||
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
|
||||
continue
|
||||
if(active_character.body_type == MALE && SA.body_type == FEMALE)
|
||||
continue
|
||||
@@ -619,7 +571,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))
|
||||
if(!(active_character.species in SA.species_allowed) && !(subtype.name in SA.species_allowed))
|
||||
continue
|
||||
if(active_character.body_type == MALE && SA.body_type == FEMALE)
|
||||
continue
|
||||
@@ -1307,3 +1259,74 @@
|
||||
|
||||
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, 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, robohead)
|
||||
|
||||
if(NS.bodyflags & HAS_HEAD_ACCESSORY) //Species that have head accessories.
|
||||
active_character.ha_style = random_head_accessory(NS)
|
||||
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, 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)
|
||||
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, 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 in SA.species_allowed))
|
||||
active_character.underwear = random_underwear(active_character.body_type, NS)
|
||||
|
||||
SA = GLOB.undershirt_list[active_character.undershirt]
|
||||
if(!SA || !(NS in SA.species_allowed))
|
||||
active_character.undershirt = random_undershirt(active_character.body_type, NS)
|
||||
|
||||
SA = GLOB.socks_list[active_character.socks]
|
||||
if(!SA || !(NS in SA.species_allowed))
|
||||
active_character.socks = random_socks(active_character.body_type, NS)
|
||||
|
||||
//reset skin tone and colour
|
||||
if(NS.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
|
||||
random_skin_tone(NS)
|
||||
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
|
||||
|
||||
@@ -207,6 +207,8 @@ 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>"
|
||||
|
||||
Reference in New Issue
Block a user