mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-24 05:06:14 +01:00
cosmetic parts are working
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
//DNA - Because fuck you and your magic numbers being all over the codebase.
|
||||
#define DNA_BLOCK_SIZE 3
|
||||
|
||||
#define DNA_UNI_IDENTITY_BLOCKS 14
|
||||
#define DNA_UNI_IDENTITY_BLOCKS 20
|
||||
#define DNA_HAIR_COLOR_BLOCK 1
|
||||
#define DNA_FACIAL_HAIR_COLOR_BLOCK 2
|
||||
#define DNA_SKIN_TONE_BLOCK 3
|
||||
@@ -80,6 +80,14 @@
|
||||
#define DNA_MUTANTMARKING_BLOCK 13
|
||||
#define DNA_TAUR_BLOCK 14
|
||||
|
||||
// hyper edit
|
||||
#define DNA_COSMETIC_HEAD_BLOCK 15
|
||||
#define DNA_COSMETIC_CHEST_BLOCK 16
|
||||
#define DNA_COSMETIC_L_ARM_BLOCK 17
|
||||
#define DNA_COSMETIC_R_ARM_BLOCK 18
|
||||
#define DNA_COSMETIC_L_LEG_BLOCK 19
|
||||
#define DNA_COSMETIC_R_LEG_BLOCK 20
|
||||
|
||||
#define DNA_SEQUENCE_LENGTH 4
|
||||
#define DNA_MUTATION_BLOCKS 8
|
||||
#define DNA_UNIQUE_ENZYMES_LEN 32
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
GLOBAL_LIST_EMPTY(cosmetic_head)
|
||||
GLOBAL_LIST_EMPTY(cosmetic_chest)
|
||||
GLOBAL_LIST_EMPTY(cosmetic_heads)
|
||||
GLOBAL_LIST_EMPTY(cosmetic_chests)
|
||||
GLOBAL_LIST_EMPTY(cosmetic_arms)
|
||||
GLOBAL_LIST_EMPTY(cosmetic_legs)
|
||||
|
||||
/proc/init_cosmetic_parts(datum/cosmetic_part/type, global_list)
|
||||
global_list = list("default")
|
||||
/proc/init_cosmetic_parts(datum/cosmetic_part/type, list/global_list)
|
||||
// if(!global_list.Find("default"))
|
||||
// global_list += "default"
|
||||
for(var/subtype in subtypesof(type))
|
||||
var/datum/cosmetic_part/part = new subtype()
|
||||
global_list[part.name] = part
|
||||
global_list[part.name] = part
|
||||
return global_list
|
||||
@@ -56,8 +56,8 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
|
||||
// hyper: cosmetic parts
|
||||
init_cosmetic_parts(/datum/cosmetic_part/head, GLOB.cosmetic_head)
|
||||
init_cosmetic_parts(/datum/cosmetic_part/chest, GLOB.cosmetic_chest)
|
||||
init_cosmetic_parts(/datum/cosmetic_part/head, GLOB.cosmetic_heads)
|
||||
init_cosmetic_parts(/datum/cosmetic_part/chest, GLOB.cosmetic_chests)
|
||||
init_cosmetic_parts(/datum/cosmetic_part/arms, GLOB.cosmetic_arms)
|
||||
init_cosmetic_parts(/datum/cosmetic_part/legs, GLOB.cosmetic_legs)
|
||||
// end cosmetic parts
|
||||
|
||||
@@ -238,12 +238,12 @@
|
||||
"flavor_text" = "",
|
||||
"silicon_flavor_text" = "",
|
||||
"ooc_text" = "",
|
||||
"cosmetic_head" = "default",
|
||||
"cosmetic_chest" = "default",
|
||||
"cosmetic_l_arm" = "default",
|
||||
"cosmetic_r_arm" = "default",
|
||||
"cosmetic_l_leg" = "default",
|
||||
"cosmetic_r_leg" = "default"))
|
||||
"cosmetic_head" = /datum/cosmetic_part/head/default,
|
||||
"cosmetic_chest" = /datum/cosmetic_part/chest/default,
|
||||
"cosmetic_l_arm" = /datum/cosmetic_part/arms/default,
|
||||
"cosmetic_r_arm" = /datum/cosmetic_part/arms/default,
|
||||
"cosmetic_l_leg" = /datum/cosmetic_part/legs/default,
|
||||
"cosmetic_r_leg" = /datum/cosmetic_part/legs/default))
|
||||
|
||||
/proc/random_hair_style(gender)
|
||||
switch(gender)
|
||||
|
||||
@@ -132,6 +132,12 @@
|
||||
if(!GLOB.taur_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
L[DNA_TAUR_BLOCK] = construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
L[DNA_COSMETIC_HEAD_BLOCK] = construct_block(GLOB.cosmetic_heads.Find(features["cosmetic_head"]), GLOB.cosmetic_heads.len)
|
||||
L[DNA_COSMETIC_CHEST_BLOCK] = construct_block(GLOB.cosmetic_chests.Find(features["cosmetic_chest"]), GLOB.cosmetic_chests.len)
|
||||
L[DNA_COSMETIC_L_ARM_BLOCK] = construct_block(GLOB.cosmetic_arms.Find(features["cosmetic_l_arm"]), GLOB.cosmetic_arms.len)
|
||||
L[DNA_COSMETIC_R_ARM_BLOCK] = construct_block(GLOB.cosmetic_arms.Find(features["cosmetic_r_arm"]), GLOB.cosmetic_arms.len)
|
||||
L[DNA_COSMETIC_L_LEG_BLOCK] = construct_block(GLOB.cosmetic_legs.Find(features["cosmetic_l_leg"]), GLOB.cosmetic_legs.len)
|
||||
L[DNA_COSMETIC_R_LEG_BLOCK] = construct_block(GLOB.cosmetic_legs.Find(features["cosmetic_r_leg"]), GLOB.cosmetic_legs.len)
|
||||
|
||||
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
|
||||
if(L[i])
|
||||
@@ -227,6 +233,18 @@
|
||||
construct_block(GLOB.mam_body_markings_list.Find(features["mam_body_markings"]), GLOB.mam_body_markings_list.len)
|
||||
if(DNA_TAUR_BLOCK)
|
||||
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
if(DNA_COSMETIC_HEAD_BLOCK)
|
||||
construct_block(GLOB.cosmetic_heads.Find(features["cosmetic_head"]), GLOB.cosmetic_heads.len)
|
||||
if(DNA_COSMETIC_CHEST_BLOCK)
|
||||
construct_block(GLOB.cosmetic_chests.Find(features["cosmetic_chest"]), GLOB.cosmetic_chests.len)
|
||||
if(DNA_COSMETIC_L_ARM_BLOCK)
|
||||
construct_block(GLOB.cosmetic_arms.Find(features["cosmetic_l_arm"]), GLOB.cosmetic_arms.len)
|
||||
if(DNA_COSMETIC_R_ARM_BLOCK)
|
||||
construct_block(GLOB.cosmetic_arms.Find(features["cosmetic_r_arm"]), GLOB.cosmetic_arms.len)
|
||||
if(DNA_COSMETIC_L_LEG_BLOCK)
|
||||
construct_block(GLOB.cosmetic_legs.Find(features["cosmetic_l_leg"]), GLOB.cosmetic_legs.len)
|
||||
if(DNA_COSMETIC_R_LEG_BLOCK)
|
||||
construct_block(GLOB.cosmetic_legs.Find(features["cosmetic_r_leg"]), GLOB.cosmetic_legs.len)
|
||||
|
||||
//Please use add_mutation or activate_mutation instead
|
||||
/datum/dna/proc/force_give(datum/mutation/human/HM)
|
||||
|
||||
@@ -102,16 +102,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
//HS13
|
||||
var/body_size = 100 //Body Size in percent
|
||||
var/can_get_preg = 0 //if they can get preggers
|
||||
var/list/cosmetic_parts = list(
|
||||
BODY_ZONE_L_ARM
|
||||
)
|
||||
|
||||
//HS13 jobs
|
||||
var/sillyroles = FALSE //for clown and mime
|
||||
var/roleplayroles = FALSE //for the roleplay roles
|
||||
var/importantroles = FALSE //for things that define as important.
|
||||
|
||||
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF",
|
||||
"tail_lizard" = "Smooth",
|
||||
@@ -200,12 +196,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
"silicon_flavor_text" = "",
|
||||
"ooc_text" = "",
|
||||
"front_genitals_over_hair" = FALSE,
|
||||
"cosmetic_head" = "default",
|
||||
"cosmetic_chest" = "default",
|
||||
"cosmetic_l_arm" = "default",
|
||||
"cosmetic_r_arm" = "default",
|
||||
"cosmetic_l_leg" = "default",
|
||||
"cosmetic_r_leg" = "default"
|
||||
"cosmetic_head" = /datum/cosmetic_part/head/default,
|
||||
"cosmetic_chest" = /datum/cosmetic_part/chest/default,
|
||||
"cosmetic_l_arm" = /datum/cosmetic_part/arms/default,
|
||||
"cosmetic_r_arm" = /datum/cosmetic_part/arms/default,
|
||||
"cosmetic_l_leg" = /datum/cosmetic_part/legs/default,
|
||||
"cosmetic_r_leg" = /datum/cosmetic_part/legs/default
|
||||
)
|
||||
|
||||
/// Security record note section
|
||||
@@ -833,8 +829,53 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
mutant_category = 0
|
||||
|
||||
dat += "</tr></table>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
// HYPER EDIT: Cosmetic body parts
|
||||
|
||||
var/datum/cosmetic_part/cosmetic_head = features["cosmetic_head"]
|
||||
var/datum/cosmetic_part/cosmetic_chest = features["cosmetic_chest"]
|
||||
var/datum/cosmetic_part/cosmetic_arms = features["cosmetic_l_arm"]
|
||||
var/datum/cosmetic_part/cosmetic_legs = features["cosmetic_l_leg"]
|
||||
|
||||
dat += "<div style='width:100%;display:block;'>"
|
||||
dat += "<h2>Cosmetic Parts</h2>"
|
||||
dat += "<div style='display:flex; align-items:stretch; justify-content:space-between;'>"
|
||||
dat += "<div style='flex: 1 1 0;'>"
|
||||
dat += "<h3 style='text-align:center;'>Head</h3>"
|
||||
dat += "<a style='display:block; width:100px'"
|
||||
dat += "href='?_src_=prefs;preference=cosmetic_head;task=input'>"
|
||||
dat += cosmetic_head.name
|
||||
dat += "</a>"
|
||||
dat += "</div>"
|
||||
dat += "<div style='flex: 1 1 0;'>"
|
||||
dat += "<h3 style='text-align:center;'>Chest</h3>"
|
||||
dat += "<a style='display:block; width:100px'"
|
||||
dat += "href='?_src_=prefs;preference=cosmetic_chest;task=input'>"
|
||||
dat += cosmetic_chest.name
|
||||
dat += "</a>"
|
||||
dat += "</div>"
|
||||
dat += "<div style='flex: 1 1 0;'>"
|
||||
dat += "<h3 style='text-align:center;'>Arms</h3>"
|
||||
dat += "<a style='display:block; width:100px'"
|
||||
dat += "href='?_src_=prefs;preference=cosmetic_arms;task=input'>"
|
||||
dat += cosmetic_arms.name
|
||||
dat += "</a>"
|
||||
dat += "</div>"
|
||||
dat += "<div style='flex: 1 1 0;'>"
|
||||
dat += "<h3 style='text-align:center;'>Legs</h3>"
|
||||
dat += "<a style='display:block; width:100px'"
|
||||
dat += "href='?_src_=prefs;preference=cosmetic_legs;task=input'>"
|
||||
dat += cosmetic_legs.name
|
||||
dat += "</a>"
|
||||
dat += "</div>"
|
||||
dat += "</div>"
|
||||
dat += "</div>"
|
||||
|
||||
|
||||
|
||||
// End hyper edit
|
||||
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>Clothing & Equipment</h2>"
|
||||
dat += "<b>Underwear:</b><a style='display:block;width:100px' href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a>"
|
||||
@@ -2297,6 +2338,81 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
new_dors = input(user, "Choose your character's dorsal tube type:", "Character Preference") as null|anything in GLOB.xeno_dorsal_list
|
||||
if(new_dors)
|
||||
features["xenodorsal"] = new_dors
|
||||
|
||||
// HYPER EDIT: Cosmetic body parts
|
||||
if("cosmetic_head")
|
||||
var/list/selectable_parts = list()
|
||||
for(var/path in GLOB.cosmetic_heads)
|
||||
var/datum/cosmetic_part/possible_part = GLOB.cosmetic_heads[path]
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt heads for this species!</span>")
|
||||
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt head style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_head"] = GLOB.cosmetic_heads[new_cosmetic_part]
|
||||
|
||||
if("cosmetic_chest")
|
||||
var/list/selectable_parts = list()
|
||||
for(var/path in GLOB.cosmetic_chests)
|
||||
var/datum/cosmetic_part/possible_part = GLOB.cosmetic_chests[path]
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt chests for this species!</span>")
|
||||
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt chest style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_chest"] = GLOB.cosmetic_chests[new_cosmetic_part]
|
||||
|
||||
// currently symmetrical
|
||||
if("cosmetic_arms")
|
||||
var/list/selectable_parts = list()
|
||||
for(var/path in GLOB.cosmetic_arms)
|
||||
var/datum/cosmetic_part/possible_part = GLOB.cosmetic_arms[path]
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt arms for this species!</span>")
|
||||
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt arms style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_l_arm"] = GLOB.cosmetic_arms[new_cosmetic_part]
|
||||
features["cosmetic_r_arm"] = GLOB.cosmetic_arms[new_cosmetic_part]
|
||||
|
||||
if("cosmetic_legs")
|
||||
var/list/selectable_parts = list()
|
||||
for(var/path in GLOB.cosmetic_legs)
|
||||
var/datum/cosmetic_part/possible_part = GLOB.cosmetic_legs[path]
|
||||
var/list/supported_species = possible_part.supported_species
|
||||
if(!show_mismatched_markings && supported_species && !supported_species.Find(pref_species.id))
|
||||
continue
|
||||
selectable_parts[path] = possible_part
|
||||
if(!selectable_parts.len)
|
||||
to_chat(user, "<span class='warning'>There are no valid alt legs for this species!</span>")
|
||||
|
||||
var/new_cosmetic_part
|
||||
var/question = "Choose your character's alt legs style:"
|
||||
new_cosmetic_part = input(user, question, "Character Preference") as null|anything in selectable_parts
|
||||
if(new_cosmetic_part)
|
||||
features["cosmetic_l_leg"] = GLOB.cosmetic_legs[new_cosmetic_part]
|
||||
features["cosmetic_r_leg"] = GLOB.cosmetic_legs[new_cosmetic_part]
|
||||
|
||||
// End hyper edit
|
||||
|
||||
//Genital code
|
||||
if("cock_color")
|
||||
var/new_cockcolor = input(user, "Penis color:", "Character Preference") as color|null
|
||||
|
||||
@@ -502,8 +502,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/list/standing = list()
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
|
||||
// hyper edit: updates cosmetic part graphics
|
||||
H.handle_cosmetic_parts()
|
||||
|
||||
if(HD && !(HAS_TRAIT(H, TRAIT_HUSK)))
|
||||
@@ -597,6 +595,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
//CITADEL EDIT - Do not forget to add this to relevent_layers list just above too!
|
||||
H.remove_overlay(BODY_TAUR_LAYER)
|
||||
//END EDIT
|
||||
H.handle_cosmetic_parts()
|
||||
|
||||
if(!mutant_bodyparts)
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
* to `species_id`. this allows us to use custom body part types for
|
||||
* each limb in character customization.
|
||||
*/
|
||||
var/cosmetic_icon
|
||||
var/datum/cosmetic_part/cosmetic_icon
|
||||
var/color_src
|
||||
var/base_bp_icon //Overrides the icon being used for this limb. This is mainly for downstreams, implemented and maintained as a favor in return for implementing synths. And also because should_draw_* for icon overrides was pretty messy. You're welcome.
|
||||
var/should_draw_gender = FALSE
|
||||
@@ -326,6 +326,11 @@
|
||||
C = owner
|
||||
no_update = FALSE
|
||||
|
||||
if(cosmetic_icon)
|
||||
if(cosmetic_icon.icon)
|
||||
base_bp_icon = cosmetic_icon.icon
|
||||
use_digitigrade = cosmetic_icon.support_digitigrade ? use_digitigrade : NOT_DIGITIGRADE
|
||||
|
||||
if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb())
|
||||
species_id = "husk" //overrides species_id
|
||||
dmg_overlay_type = "" //no damage overlay shown when husked
|
||||
@@ -445,6 +450,10 @@
|
||||
var/icon_gender = (body_gender == FEMALE) ? "f" : "m" //gender of the icon, if applicable
|
||||
var/is_husk = species_id == "husk"
|
||||
|
||||
/// HYPER: allow for custom limb icons in character customization
|
||||
var/has_cosmetic_state = !isnull(cosmetic_icon) && !isnull(cosmetic_icon.icon_state)
|
||||
var/limb_style = has_cosmetic_state ? cosmetic_icon.icon_state : species_id
|
||||
|
||||
if(dropped)
|
||||
image_dir = SOUTH
|
||||
if(dmg_overlay_type)
|
||||
@@ -453,7 +462,7 @@
|
||||
if(burnstate)
|
||||
. += image('icons/mob/dam_mob.dmi', "[dmg_overlay_type]_[body_zone]_0[burnstate]", -DAMAGE_LAYER, image_dir)
|
||||
|
||||
if(!isnull(body_markings) && status == BODYPART_ORGANIC)
|
||||
if(!isnull(body_markings) && status == BODYPART_ORGANIC && !has_cosmetic_state)
|
||||
if(!use_digitigrade)
|
||||
if(BODY_ZONE_CHEST)
|
||||
. += image(body_markings_icon, "[body_markings]_[body_zone]_[icon_gender]", -MARKING_LAYER, image_dir)
|
||||
@@ -484,9 +493,6 @@
|
||||
if((body_zone != BODY_ZONE_HEAD && body_zone != BODY_ZONE_CHEST))
|
||||
should_draw_gender = FALSE
|
||||
|
||||
/// HYPER: allow for custom limb icons in character customization
|
||||
var/limb_style = !isnull(cosmetic_icon) ? cosmetic_icon : species_id
|
||||
|
||||
if(is_organic_limb())
|
||||
limb.icon = base_bp_icon || 'icons/mob/human_parts.dmi'
|
||||
if(should_draw_gender)
|
||||
@@ -501,7 +507,7 @@
|
||||
limb.icon_state = "[limb_style]_[body_zone]"
|
||||
|
||||
// Body markings
|
||||
if(body_markings)
|
||||
if(body_markings && !has_cosmetic_state)
|
||||
if(is_husk)
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(is_husk && use_digitigrade)
|
||||
@@ -521,7 +527,7 @@
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[limb_style]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(body_markings)
|
||||
if(body_markings && !has_cosmetic_state)
|
||||
if(is_husk)
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
@@ -538,14 +544,14 @@
|
||||
if(aux_zone)
|
||||
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(!isnull(auxmarking))
|
||||
if(!isnull(auxmarking) && !has_cosmetic_state)
|
||||
if(is_husk)
|
||||
auxmarking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[aux_zone]", -aux_layer, image_dir)
|
||||
else
|
||||
auxmarking = image(body_markings_icon, "[body_markings]_[aux_zone]", -aux_layer, image_dir)
|
||||
. += auxmarking
|
||||
|
||||
if(!isnull(body_markings))
|
||||
if(!isnull(body_markings) && !has_cosmetic_state)
|
||||
if(is_husk)
|
||||
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else if(is_husk && use_digitigrade)
|
||||
@@ -567,10 +573,10 @@
|
||||
limb.color = "#[draw_color]"
|
||||
if(aux_zone)
|
||||
aux.color = "#[draw_color]"
|
||||
if(!isnull(auxmarking))
|
||||
if(!isnull(auxmarking) && !has_cosmetic_state)
|
||||
auxmarking.color = list(markings_color)
|
||||
|
||||
if(!isnull(body_markings))
|
||||
if(!isnull(body_markings) && !has_cosmetic_state)
|
||||
if(is_husk)
|
||||
marking.color = "#141414"
|
||||
else
|
||||
|
||||
@@ -5,18 +5,30 @@
|
||||
S["feature_cosmetic_r_arm"] >> features["cosmetic_r_arm"]
|
||||
S["feature_cosmetic_l_leg"] >> features["cosmetic_l_leg"]
|
||||
S["feature_cosmetic_r_leg"] >> features["cosmetic_r_leg"]
|
||||
features["cosmetic_head"] = sanitize_inlist(features["cosmetic_head"], GLOB.cosmetic_head, "default")
|
||||
features["cosmetic_chest"] = sanitize_inlist(features["cosmetic_chest"], GLOB.cosmetic_chest, "default")
|
||||
features["cosmetic_l_arm"] = sanitize_inlist(features["cosmetic_l_arm"], GLOB.cosmetic_arms, "default")
|
||||
features["cosmetic_r_arm"] = sanitize_inlist(features["cosmetic_r_arm"], GLOB.cosmetic_arms, "default")
|
||||
features["cosmetic_l_leg"] = sanitize_inlist(features["cosmetic_l_leg"], GLOB.cosmetic_legs, "default")
|
||||
features["cosmetic_r_leg"] = sanitize_inlist(features["cosmetic_r_leg"], GLOB.cosmetic_legs, "default")
|
||||
var/cosmetic_head = sanitize_inlist(features["cosmetic_head"], GLOB.cosmetic_heads, "default")
|
||||
var/cosmetic_chest = sanitize_inlist(features["cosmetic_chest"], GLOB.cosmetic_chests, "default")
|
||||
var/cosmetic_l_arm = sanitize_inlist(features["cosmetic_l_arm"], GLOB.cosmetic_arms, "default")
|
||||
var/cosmetic_r_arm = sanitize_inlist(features["cosmetic_r_arm"], GLOB.cosmetic_arms, "default")
|
||||
var/cosmetic_l_leg = sanitize_inlist(features["cosmetic_l_leg"], GLOB.cosmetic_legs, "default")
|
||||
var/cosmetic_r_leg = sanitize_inlist(features["cosmetic_r_leg"], GLOB.cosmetic_legs, "default")
|
||||
features["cosmetic_head"] = GLOB.cosmetic_heads[cosmetic_head]
|
||||
features["cosmetic_chest"] = GLOB.cosmetic_chests[cosmetic_chest]
|
||||
features["cosmetic_l_arm"] = GLOB.cosmetic_arms[cosmetic_l_arm]
|
||||
features["cosmetic_r_arm"] = GLOB.cosmetic_arms[cosmetic_r_arm]
|
||||
features["cosmetic_l_leg"] = GLOB.cosmetic_legs[cosmetic_l_leg]
|
||||
features["cosmetic_r_leg"] = GLOB.cosmetic_legs[cosmetic_r_leg]
|
||||
|
||||
|
||||
/datum/preferences/proc/hyper_character_pref_save(savefile/S)
|
||||
WRITE_FILE(S["feature_cosmetic_head"], features["cosmetic_head"])
|
||||
WRITE_FILE(S["feature_cosmetic_chest"], features["cosmetic_chest"])
|
||||
WRITE_FILE(S["feature_cosmetic_l_arm"], features["cosmetic_l_arm"])
|
||||
WRITE_FILE(S["feature_cosmetic_r_arm"], features["cosmetic_r_arm"])
|
||||
WRITE_FILE(S["feature_cosmetic_l_leg"], features["cosmetic_l_leg"])
|
||||
WRITE_FILE(S["feature_cosmetic_r_leg"], features["cosmetic_r_leg"])
|
||||
var/datum/cosmetic_part/head = features["cosmetic_head"]
|
||||
var/datum/cosmetic_part/chest = features["cosmetic_chest"]
|
||||
var/datum/cosmetic_part/l_arm = features["cosmetic_l_arm"]
|
||||
var/datum/cosmetic_part/r_arm = features["cosmetic_r_arm"]
|
||||
var/datum/cosmetic_part/l_leg = features["cosmetic_l_leg"]
|
||||
var/datum/cosmetic_part/r_leg = features["cosmetic_r_leg"]
|
||||
WRITE_FILE(S["feature_cosmetic_head"], head.name)
|
||||
WRITE_FILE(S["feature_cosmetic_chest"], chest.name)
|
||||
WRITE_FILE(S["feature_cosmetic_l_arm"], l_arm.name)
|
||||
WRITE_FILE(S["feature_cosmetic_r_arm"], r_arm.name)
|
||||
WRITE_FILE(S["feature_cosmetic_l_leg"], l_leg.name)
|
||||
WRITE_FILE(S["feature_cosmetic_r_leg"], r_leg.name)
|
||||
@@ -12,18 +12,40 @@ fails and the part is rejected. so you can't attach mammal-bird legs to avians
|
||||
safely.
|
||||
*/
|
||||
|
||||
#define COSMETIC_BASIC_SPECIES = list("mammal", "avian", "aquatic", "insect", "xeno", "synthliz")
|
||||
|
||||
|
||||
/datum/cosmetic_part
|
||||
var/name
|
||||
var/icon = 'hyperstation/icons/mob/char_parts.dmi'
|
||||
var/icon_state
|
||||
var/support_digitigrade = TRUE
|
||||
var/list/supported_species
|
||||
|
||||
/datum/cosmetic_part/head
|
||||
/datum/cosmetic_part/chest
|
||||
/datum/cosmetic_part/arms
|
||||
/datum/cosmetic_part/legs
|
||||
|
||||
/datum/cosmetic_part/head/default
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/chest/default
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/arms/default
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/legs/default
|
||||
name = "default"
|
||||
icon = null
|
||||
|
||||
/datum/cosmetic_part/legs/avian
|
||||
name = "avian"
|
||||
icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
icon_state = "avian"
|
||||
icon_state = "avian"
|
||||
supported_species = COSMETIC_BASIC_SPECIES
|
||||
support_digitigrade = FALSE
|
||||
@@ -1,15 +1,14 @@
|
||||
/obj/item/bodypart/proc/apply_cosmetic(datum/cosmetic_part/part)
|
||||
if(!is_organic_limb() || animal_origin || !part)
|
||||
return
|
||||
cosmetic_icon = part.icon_state
|
||||
icon = part.icon
|
||||
cosmetic_icon = part
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/handle_cosmetic_parts()
|
||||
var/features = src.dna.features
|
||||
var/features = dna.features
|
||||
var/list/body_zones = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
for(var/I in body_zones)
|
||||
var/zone = body_zones[I]
|
||||
var/cosmetic_pref = features["cosmetic_" + zone]
|
||||
for(var/zone in body_zones)
|
||||
var/datum/cosmetic_part/cosmetic_pref = features["cosmetic_" + zone]
|
||||
if(!istype(cosmetic_pref, /datum/cosmetic_part))
|
||||
continue
|
||||
var/datum/cosmetic_part/part = cosmetic_pref
|
||||
|
||||
Reference in New Issue
Block a user