cosmetic parts addition

This commit is contained in:
sarcoph
2022-05-11 21:47:00 -08:00
parent 6a26cd5b85
commit bf112ac42f
14 changed files with 139 additions and 26 deletions
+10 -1
View File
@@ -102,6 +102,9 @@ 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
@@ -196,7 +199,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
"flavor_text" = "",
"silicon_flavor_text" = "",
"ooc_text" = "",
"front_genitals_over_hair" = FALSE
"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"
)
/// Security record note section
@@ -576,6 +576,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
all_quirks -= V
cit_character_pref_load(S)
hyper_character_pref_load(S)
return 1
@@ -671,6 +672,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["all_quirks"] , all_quirks)
cit_character_pref_save(S)
hyper_character_pref_save(S)
return 1
@@ -5,30 +5,24 @@
icon_state = "caucasian_m"
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
/mob/living/carbon/human/Initialize()
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down)
time_initialized = world.time
//initialize limbs first
create_bodyparts()
//initialize dna. for spawned humans; overwritten by other code
create_dna(src)
randomize_human(src)
dna.initialize_dna()
if(dna.species)
set_species(dna.species.type)
//initialise organs
create_internal_organs() //most of it is done in set_species now, this is only for parent call
physiology = new()
AddComponent(/datum/component/personal_crafting)
. = ..()
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /mob/living/carbon/human/clean_blood)
@@ -503,6 +503,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
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)))
// lipstick
if(H.lip_style && (LIPS in species_traits))
@@ -678,21 +681,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if("mam_tail" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "mam_tail"
if("mam_waggingtail" in mutant_bodyparts)
if(H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR) || (!H.dna.features["taur"] == "None"))
bodyparts_to_add -= "mam_waggingtail"
else if ("mam_tail" in mutant_bodyparts)
bodyparts_to_add -= "mam_waggingtail"
if("mam_ears" in mutant_bodyparts)
if(!H.dna.features["mam_ears"] || H.dna.features["mam_ears"] == "None" || H.head && (H.head.flags_inv & HIDEEARS) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEEARS)) || !HD || HD.status == BODYPART_ROBOTIC)
bodyparts_to_add -= "mam_ears"
if("mam_snouts" in mutant_bodyparts) //Take a closer look at that snout!
if((H.wear_mask && (H.wear_mask.flags_inv & HIDESNOUT)) || (H.head && (H.head.flags_inv & HIDESNOUT)) || !HD || HD.status == BODYPART_ROBOTIC)
bodyparts_to_add -= "mam_snouts"
if("taur" in mutant_bodyparts)
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None" || (H.wear_suit && (H.wear_suit.flags_inv & HIDETAUR)))
bodyparts_to_add -= "taur"
+23 -12
View File
@@ -44,6 +44,13 @@
var/skin_tone = ""
var/body_gender = ""
var/species_id = ""
/**
* HYPER: when getting the appearance of a limb, the game will check
* for `cosmetic_icon` first. if there is none, it will default back
* to `species_id`. this allows us to use custom body part types for
* each limb in character customization.
*/
var/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
@@ -436,6 +443,7 @@
var/image_dir = 0
var/icon_gender = (body_gender == FEMALE) ? "f" : "m" //gender of the icon, if applicable
var/is_husk = species_id == "husk"
if(dropped)
image_dir = SOUTH
@@ -464,7 +472,7 @@
if(animal_origin)
if(is_organic_limb())
limb.icon = 'icons/mob/animal_parts.dmi'
if(species_id == "husk")
if(is_husk)
limb.icon_state = "[animal_origin]_husk_[body_zone]"
else
limb.icon_state = "[animal_origin]_[body_zone]"
@@ -476,24 +484,27 @@
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)
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
limb.icon_state = "[limb_style]_[body_zone]_[icon_gender]"
else if (use_digitigrade)
if(base_bp_icon == DEFAULT_BODYPART_ICON_ORGANIC) //Compatibility hack for the current iconset.
limb.icon_state = "digitigrade_[use_digitigrade]_[body_zone]"
else
limb.icon_state = "[species_id]_digitigrade_[use_digitigrade]_[body_zone]"
limb.icon_state = "[limb_style]_digitigrade_[use_digitigrade]_[body_zone]"
else
limb.icon_state = "[species_id]_[body_zone]"
limb.icon_state = "[limb_style]_[body_zone]"
// Body markings
if(body_markings)
if(species_id == "husk")
if(is_husk)
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
else if(species_id == "husk" && use_digitigrade)
else if(is_husk && use_digitigrade)
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_digitigrade_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
else if(!use_digitigrade)
@@ -508,10 +519,10 @@
// Citadel End
if(aux_zone)
aux = image(limb.icon, "[species_id]_[aux_zone]", -aux_layer, image_dir)
aux = image(limb.icon, "[limb_style]_[aux_zone]", -aux_layer, image_dir)
. += aux
if(body_markings)
if(species_id == "husk")
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)
@@ -528,16 +539,16 @@
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
. += aux
if(!isnull(auxmarking))
if(species_id == "husk")
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(species_id == "husk")
if(is_husk)
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_[body_zone]", -MARKING_LAYER, image_dir)
else if(species_id == "husk" && use_digitigrade)
else if(is_husk && use_digitigrade)
marking = image('modular_citadel/icons/mob/markings_notmammals.dmi', "husk_digitigrade_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
else if(!use_digitigrade)
@@ -560,7 +571,7 @@
auxmarking.color = list(markings_color)
if(!isnull(body_markings))
if(species_id == "husk")
if(is_husk)
marking.color = "#141414"
else
marking.color = list(markings_color)