Skip to content

Commit

Permalink
[MIRROR] bodytypes to do with body shape and sprite handling have the…
Browse files Browse the repository at this point in the history
…ir own var (#1125)

* bodytypes to do with body shape and sprite handling have their own var

* Refactors our modular files, painfully

---------

Co-authored-by: 13spacemen <[email protected]>
Co-authored-by: Mal <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Feb 26, 2024
1 parent 56d4faa commit d1b64b2
Show file tree
Hide file tree
Showing 42 changed files with 232 additions and 185 deletions.
38 changes: 20 additions & 18 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,40 @@
#define ALIEN_BODYPART "alien"
#define LARVA_BODYPART "larva"

//Bodytype defines for how things can be worn, surgery, and other misc things.
//Bodytype defines for surgery, and other misc things.
///The limb is organic.
#define BODYTYPE_ORGANIC (1<<0)
///The limb is robotic.
#define BODYTYPE_ROBOTIC (1<<1)
///The limb fits the human mold. This is not meant to be literal, if the sprite "fits" on a human, it is "humanoid", regardless of origin.
#define BODYTYPE_HUMANOID (1<<2)
///The limb fits the monkey mold.
#define BODYTYPE_MONKEY (1<<3)
///The limb is digitigrade.
#define BODYTYPE_DIGITIGRADE (1<<4)
///The limb is snouted.
#define BODYTYPE_SNOUTED (1<<5)
///A placeholder bodytype for xeno larva, so their limbs cannot be attached to anything.
#define BODYTYPE_LARVA_PLACEHOLDER (1<<6)
#define BODYTYPE_LARVA_PLACEHOLDER (1<<2)
///The limb is from a xenomorph.
#define BODYTYPE_ALIEN (1<<7)
#define BODYTYPE_ALIEN (1<<3)
///The limb is from a golem
#define BODYTYPE_GOLEM (1<<8)
#define BODYTYPE_GOLEM (1<<4)
// NOVA EDIT ADDITION
///The limb fits a modular custom shape
#define BODYTYPE_CUSTOM (1<<9)
#define BODYSHAPE_CUSTOM (1<<9)
///The limb fits a taur body
#define BODYTYPE_TAUR (1<<10)
#define BODYSHAPE_TAUR (1<<10)
///The limb causes shoes to no longer be displayed, useful for taurs.
#define BODYTYPE_HIDE_SHOES (1<<11)
#define BODYSHAPE_HIDE_SHOES (1<<11)
///The limb causes glasses and hats to be drawn on layers 5 and 4 respectively. Currently used for snouts with the (Top) suffix, which are drawn on layer 6 and would normally cover facewear
#define BODYTYPE_ALT_FACEWEAR_LAYER (1<<12)
#define BODYSHAPE_ALT_FACEWEAR_LAYER (1<<12)
// NOVA EDIT END

#define BODYTYPE_BIOSCRAMBLE_COMPATIBLE (BODYTYPE_HUMANOID | BODYTYPE_MONKEY | BODYTYPE_ALIEN)
#define BODYTYPE_CAN_BE_BIOSCRAMBLED(bodytype) (!(bodytype & BODYTYPE_ROBOTIC) && (bodytype & BODYTYPE_BIOSCRAMBLE_COMPATIBLE))
// Bodyshape defines for how things can be worn, i.e., what "shape" the mob sprite is
///The limb fits the human mold. This is not meant to be literal, if the sprite "fits" on a human, it is "humanoid", regardless of origin.
#define BODYSHAPE_HUMANOID (1<<0)
///The limb fits the monkey mold.
#define BODYSHAPE_MONKEY (1<<1)
///The limb is digitigrade.
#define BODYSHAPE_DIGITIGRADE (1<<2)
///The limb is snouted.
#define BODYSHAPE_SNOUTED (1<<3)

#define BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE (BODYTYPE_ROBOTIC | BODYTYPE_LARVA_PLACEHOLDER | BODYTYPE_GOLEM)
#define BODYTYPE_CAN_BE_BIOSCRAMBLED(bodytype) (!(bodytype & BODYTYPE_BIOSCRAMBLE_INCOMPATIBLE))

// Defines for Species IDs. Used to refer to the name of a species, for things like bodypart names or species preferences.
#define SPECIES_ABDUCTOR "abductor"
Expand Down
36 changes: 24 additions & 12 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ DEFINE_BITFIELD(reaction_flags, list(
DEFINE_BITFIELD(bodytype, list(
"BODYTYPE_ORGANIC" = BODYTYPE_ORGANIC,
"BODYTYPE_ROBOTIC" = BODYTYPE_ROBOTIC,
"BODYTYPE_HUMANOID" = BODYTYPE_HUMANOID,
"BODYTYPE_MONKEY" = BODYTYPE_MONKEY,
"BODYTYPE_DIGITIGRADE" = BODYTYPE_DIGITIGRADE,
"BODYTYPE_SNOUTED" = BODYTYPE_SNOUTED,
"BODYTYPE_LARVA_PLACEHOLDER" = BODYTYPE_LARVA_PLACEHOLDER,
"BODYTYPE_ALIEN" = BODYTYPE_ALIEN,
"BODYTYPE_GOLEM" = BODYTYPE_GOLEM,
Expand All @@ -390,18 +386,34 @@ DEFINE_BITFIELD(bodytype, list(
DEFINE_BITFIELD(acceptable_bodytype, list(
"BODYTYPE_ORGANIC" = BODYTYPE_ORGANIC,
"BODYTYPE_ROBOTIC" = BODYTYPE_ROBOTIC,
"BODYTYPE_HUMANOID" = BODYTYPE_HUMANOID,
"BODYTYPE_MONKEY" = BODYTYPE_MONKEY,
"BODYTYPE_DIGITIGRADE" = BODYTYPE_DIGITIGRADE,
"BODYTYPE_SNOUTED" = BODYTYPE_SNOUTED,
"BODYTYPE_LARVA_PLACEHOLDER" = BODYTYPE_LARVA_PLACEHOLDER,
"BODYTYPE_ALIEN" = BODYTYPE_ALIEN,
"BODYTYPE_GOLEM" = BODYTYPE_GOLEM,
))

DEFINE_BITFIELD(bodyshape, list(
"BODYSHAPE_HUMANOID" = BODYSHAPE_HUMANOID,
"BODYSHAPE_MONKEY" = BODYSHAPE_MONKEY,
"BODYSHAPE_DIGITIGRADE" = BODYSHAPE_DIGITIGRADE,
"BODYSHAPE_SNOUTED" = BODYSHAPE_SNOUTED,
// NOVA EDIT ADDITION - customization
"BODYSHAPE__CUSTOM" = BODYSHAPE_CUSTOM,
"BODYSHAPE__TAUR" = BODYSHAPE_TAUR,
"BODYSHAPE__HIDE_SHOES" = BODYSHAPE_HIDE_SHOES,
"BODYSHAPE__ALT_FACEWEAR_LAYER" = BODYSHAPE_ALT_FACEWEAR_LAYER,
// NOVA EDIT END
))

DEFINE_BITFIELD(acceptable_bodyshape, list(
"BODYSHAPE_HUMANOID" = BODYSHAPE_HUMANOID,
"BODYSHAPE_MONKEY" = BODYSHAPE_MONKEY,
"BODYSHAPE_DIGITIGRADE" = BODYSHAPE_DIGITIGRADE,
"BODYSHAPE_SNOUTED" = BODYSHAPE_SNOUTED,
// NOVA EDIT ADDITION - customization
"BODYTYPE_CUSTOM" = BODYTYPE_CUSTOM,
"BODYTYPE_TAUR" = BODYTYPE_TAUR,
"BODYTYPE_HIDE_SHOES" = BODYTYPE_HIDE_SHOES,
"BODYTYPE_ALT_FACEWEAR_LAYER" = BODYTYPE_ALT_FACEWEAR_LAYER,
"BODYSHAPE__CUSTOM" = BODYSHAPE_CUSTOM,
"BODYSHAPE__TAUR" = BODYSHAPE_TAUR,
"BODYSHAPE__HIDE_SHOES" = BODYSHAPE_HIDE_SHOES,
"BODYSHAPE__ALT_FACEWEAR_LAYER" = BODYSHAPE_ALT_FACEWEAR_LAYER,
// NOVA EDIT END
))

Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/creamed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ GLOBAL_LIST_INIT(creamable, typecacheof(list(
qdel(src)
return
bodypart_overlay = new()
if(carbon_parent.bodytype & BODYTYPE_SNOUTED) //stupid, but external organ bodytypes are not stored on the limb
if(carbon_parent.bodyshape & BODYSHAPE_SNOUTED) //stupid, but external organ bodytypes are not stored on the limb
bodypart_overlay.icon_state = "creampie_lizard"
else if(my_head.bodytype & BODYTYPE_MONKEY)
else if(my_head.bodyshape & BODYSHAPE_MONKEY)
bodypart_overlay.icon_state = "creampie_monkey"
else
bodypart_overlay.icon_state = "creampie_human"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/under/_under.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
/* NOVA EDIT REMOVAL - This breaks jumpsuit adjustment. Plus, we don't support it.
if((supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION) && ishuman(user))
var/mob/living/carbon/human/wearer = user
if(wearer.bodytype & BODYTYPE_DIGITIGRADE)
if(wearer.bodyshape & BODYSHAPE_DIGITIGRADE)
adjusted = DIGITIGRADE_STYLE
update_appearance()
*/ // NOVA EDIT END
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@
set_usable_hands(usable_hands + 1)

synchronize_bodytypes()
synchronize_bodyshapes()

///Proc to hook behavior on bodypart removals. Do not directly call. You're looking for [/obj/item/bodypart/proc/drop_limb()].
/mob/living/carbon/proc/remove_bodypart(obj/item/bodypart/old_bodypart, special)
Expand All @@ -1065,6 +1066,7 @@
set_usable_hands(usable_hands - 1)

synchronize_bodytypes()
synchronize_bodyshapes()

///Updates the bodypart speed modifier based on our bodyparts.
/mob/living/carbon/proc/update_bodypart_speed_modifier()
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/carbon_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
var/last_top_offset

/// A bitfield of "bodytypes", updated by /obj/item/bodypart/proc/synchronize_bodytypes()
var/bodytype = BODYTYPE_HUMANOID | BODYTYPE_ORGANIC
var/bodytype = BODYTYPE_ORGANIC

/// A bitfield of "bodyshapes", updated by /obj/item/bodypart/proc/synchronize_bodyshapes()
var/bodyshape = BODYSHAPE_HUMANOID

COOLDOWN_DECLARE(bleeding_message_cd)

Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
working_shirt.pixel_y += height_offset
standing += working_shirt
if(species_human.socks && species_human.num_legs >= 2 && !(species_human.bodytype & BODYTYPE_DIGITIGRADE))
if(species_human.socks && species_human.num_legs >= 2 && !(species_human.bodyshape & BODYSHAPE_DIGITIGRADE))
var/datum/sprite_accessory/socks/socks = GLOB.socks_list[species_human.socks]
if(socks)
standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER)
Expand Down Expand Up @@ -936,7 +936,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(H.num_legs < 2)
return FALSE
/* NOVA EDIT REMOVAL
if((H.bodytype & BODYTYPE_DIGITIGRADE) && !(I.item_flags & IGNORE_DIGITIGRADE))
if((H.bodyshape & BODYSHAPE_DIGITIGRADE) && !(I.item_flags & IGNORE_DIGITIGRADE))
if(!(I.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON)))
if(!disable_warning)
to_chat(H, span_warning("The footwear around here isn't compatible with your feet!"))
Expand Down Expand Up @@ -968,7 +968,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
return equip_delay_self_check(I, H, bypass_equip_delay_self)
if(ITEM_SLOT_ICLOTHING)
var/obj/item/bodypart/chest = H.get_bodypart(BODY_ZONE_CHEST)
if(chest && (chest.bodytype & BODYTYPE_MONKEY))
if(chest && (chest.bodyshape & BODYSHAPE_MONKEY))
if(!(I.supports_variations_flags & CLOTHING_MONKEY_VARIATION))
if(!disable_warning)
to_chat(H, span_warning("[I] doesn't fit your [chest.name]!"))
Expand Down
58 changes: 29 additions & 29 deletions code/modules/mob/living/carbon/human/human_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,29 +93,29 @@ There are several things that need to be remembered:

var/mutable_appearance/uniform_overlay
//This is how non-humanoid clothing works. You check if the mob has the right bodyflag, and the clothing has the corresponding clothing flag.
//handled_by_bodytype is used to track whether or not we successfully used an alternate sprite. It's set to TRUE to ease up on copy-paste.
//handled_by_bodyshape is used to track whether or not we successfully used an alternate sprite. It's set to TRUE to ease up on copy-paste.
//icon_file MUST be set to null by default, or it causes issues.
//handled_by_bodytype MUST be set to FALSE under the if(!icon_exists()) statement, or everything breaks.
//"override_file = handled_by_bodytype ? icon_file : null" MUST be added to the arguments of build_worn_icon()
//handled_by_bodyshape MUST be set to FALSE under the if(!icon_exists()) statement, or everything breaks.
//"override_file = handled_by_bodyshape ? icon_file : null" MUST be added to the arguments of build_worn_icon()
//Friendly reminder that icon_exists(file, state, scream = TRUE) is your friend when debugging this code.
var/handled_by_bodytype = TRUE
var/handled_by_bodyshape = TRUE
var/icon_file
var/woman
var/digi // NOVA EDIT ADDITION - Digi female gender shaping
var/female_sprite_flags = uniform.female_sprite_flags // NOVA EDIT ADDITION - Digi female gender shaping
var/mutant_styles = NONE // NOVA EDIT ADDITON - mutant styles to pass down to build_worn_icon.
//BEGIN SPECIES HANDLING
if((bodytype & BODYTYPE_MONKEY) && (uniform.supports_variations_flags & CLOTHING_MONKEY_VARIATION))
if((bodyshape & BODYSHAPE_MONKEY) && (uniform.supports_variations_flags & CLOTHING_MONKEY_VARIATION))
icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_UNIFORM, w_uniform, src) // NOVA EDIT CHANGE - ORIGINAL: icon_file = MONKEY_UNIFORM_FILE
else if((bodytype & BODYTYPE_DIGITIGRADE) && (uniform.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION))
else if((bodyshape & BODYSHAPE_DIGITIGRADE) && (uniform.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION))
icon_file = uniform.worn_icon_digi || DIGITIGRADE_UNIFORM_FILE // NOVA EDIT CHANGE - ORIGINAL: icon_file = DIGITIGRADE_UNIFORM_FILE
digi = TRUE // NOVA EDIT ADDITION - Digi female gender shaping
// NOVA EDIT ADDITION - birbs
else if(bodytype & BODYTYPE_CUSTOM)
else if(bodyshape & BODYSHAPE_CUSTOM)
icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_UNIFORM, w_uniform, src) // Might have to refactor how this works eventually, maybe.
// NOVA EDIT END
//Female sprites have lower priority than digitigrade sprites
if(dna.species.sexes && (bodytype & BODYTYPE_HUMANOID) && physique == FEMALE && !(female_sprite_flags & NO_FEMALE_UNIFORM)) //Agggggggghhhhh // NOVA EDIT CHANGE - ORIGINAL: else if(dna.species.sexes && (bodytype & BODYTYPE_HUMANOID) && physique == FEMALE && !(uniform.female_sprite_flags & NO_FEMALE_UNIFORM))
if(dna.species.sexes && (bodyshape & BODYSHAPE_HUMANOID) && physique == FEMALE && !(female_sprite_flags & NO_FEMALE_UNIFORM)) // NOVA EDIT CHANGE - ORIGINAL: else if(dna.species.sexes && (bodyshape & BODYSHAPE_HUMANOID) && physique == FEMALE && !(uniform.female_sprite_flags & NO_FEMALE_UNIFORM)) //Agggggggghhhhh
woman = TRUE
// NOVA EDIT ADDITION START - Digi female gender shaping
if(digi)
Expand All @@ -127,10 +127,10 @@ There are several things that need to be remembered:

if(!icon_exists(icon_file, RESOLVE_ICON_STATE(uniform)))
icon_file = DEFAULT_UNIFORM_FILE
handled_by_bodytype = FALSE
handled_by_bodyshape = FALSE

// NOVA EDIT ADDITION START - Taur-friendly suits!
if(bodytype & BODYTYPE_TAUR)
if(bodyshape & BODYSHAPE_TAUR)
if(istype(uniform) && uniform.gets_cropped_on_taurs)
mutant_styles |= get_taur_mode()
// NOVA EDIT END
Expand All @@ -142,7 +142,7 @@ There are several things that need to be remembered:
isinhands = FALSE,
female_uniform = woman ? female_sprite_flags : null, // NOVA EDIT CHANGE - Digi female gender shaping - ORIGINAL: female_uniform = woman ? uniform.female_sprite_flags : null,
override_state = target_overlay,
override_file = handled_by_bodytype ? icon_file : null,
override_file = handled_by_bodyshape ? icon_file : null,
mutant_styles = mutant_styles, // NOVA EDIT ADDITION - Taur-friendly uniforms!
)

Expand Down Expand Up @@ -209,7 +209,7 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_GLOVES, gloves, src)
if(species_icon_file)
icon_file = species_icon_file
Expand Down Expand Up @@ -252,7 +252,7 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_GLASSES, glasses, src)
if(species_icon_file)
icon_file = species_icon_file
Expand Down Expand Up @@ -291,7 +291,7 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_EARS, ears, src)
if(species_icon_file)
icon_file = species_icon_file
Expand Down Expand Up @@ -325,13 +325,13 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_NECK, wear_neck, src)
if(species_icon_file)
icon_file = species_icon_file
mutant_override = TRUE
//On the off-chance we have a neck item that has to move around or cover the muzzle, it ALSO gets worn_icon_muzzled compatiability
if((bodytype & BODYTYPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) && worn_item.worn_icon_muzzled)
if((bodyshape & BODYSHAPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) && worn_item.worn_icon_muzzled)
var/snout_icon_file = worn_item.worn_icon_muzzled
if(snout_icon_file && icon_exists(snout_icon_file, RESOLVE_ICON_STATE(worn_item)))
icon_file = snout_icon_file
Expand Down Expand Up @@ -371,17 +371,17 @@ There are several things that need to be remembered:
// NOVA EDIT ADDITION START
var/mutant_override = FALSE

if((bodytype & BODYTYPE_DIGITIGRADE) && (worn_item.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION))
if((bodyshape & BODYSHAPE_DIGITIGRADE) && (worn_item.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION))
var/obj/item/bodypart/leg = src.get_bodypart(BODY_ZONE_L_LEG)
if(leg.limb_id == "digitigrade" || leg.bodytype & BODYTYPE_DIGITIGRADE)//Snowflakey and bad. But it makes it look consistent.
if(leg.limb_id == "digitigrade" || leg.bodyshape & BODYSHAPE_DIGITIGRADE)//Snowflakey and bad. But it makes it look consistent.
icon_file = worn_item.worn_icon_digi || DIGITIGRADE_SHOES_FILE // NOVA EDIT CHANGE
mutant_override = TRUE // NOVA EDIT ADDITION
if(!mutant_override && bodytype & BODYTYPE_CUSTOM)
if(!mutant_override && bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_SHOES, shoes, src)
if(species_icon_file)
icon_file = species_icon_file
mutant_override = TRUE
if(bodytype & BODYTYPE_HIDE_SHOES)
if(bodyshape & BODYSHAPE_HIDE_SHOES)
return // We just don't want shoes that float if we're not displaying legs (useful for taurs, for now)
// NOVA EDIT END

Expand Down Expand Up @@ -444,12 +444,12 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION - This needs to be refactored.
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_HEAD, head, src)
if(species_icon_file)
icon_file = species_icon_file
mutant_override = TRUE
if((icon_file == 'icons/mob/clothing/head/default.dmi') && (bodytype & BODYTYPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION))
if((icon_file == 'icons/mob/clothing/head/default.dmi') && (bodyshape & BODYSHAPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION))
var/snout_icon_file = worn_item.worn_icon_muzzled || SNOUTED_HEAD_FILE
if(snout_icon_file && icon_exists(snout_icon_file, RESOLVE_ICON_STATE(worn_item)))
icon_file = snout_icon_file
Expand Down Expand Up @@ -486,7 +486,7 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_BELT, belt, src)
if(species_icon_file)
icon_file = species_icon_file
Expand Down Expand Up @@ -521,18 +521,18 @@ There are several things that need to be remembered:
var/mutant_styles = NONE

//More currently unused digitigrade handling
if(bodytype & BODYTYPE_DIGITIGRADE)
if(bodyshape & BODYSHAPE_DIGITIGRADE)
if(worn_item.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION)
icon_file = worn_item.worn_icon_digi || DIGITIGRADE_SUIT_FILE // NOVA EDIT CHANGE
mutant_override = TRUE

if(!mutant_override && bodytype & BODYTYPE_CUSTOM)
if(!mutant_override && bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_SUIT, wear_suit, src)
if(species_icon_file)
icon_file = species_icon_file
mutant_override = TRUE

if(bodytype & BODYTYPE_TAUR)
if(bodyshape & BODYSHAPE_TAUR)
var/obj/item/clothing/suit/worn_suit = wear_suit
if(istype(worn_suit) && worn_suit.gets_cropped_on_taurs)
mutant_styles |= get_taur_mode()
Expand Down Expand Up @@ -595,12 +595,12 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_MASK, wear_mask, src)
if(species_icon_file)
icon_file = species_icon_file
mutant_override = TRUE
if((icon_file == 'icons/mob/clothing/mask.dmi') && (bodytype & BODYTYPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION))
if((icon_file == 'icons/mob/clothing/mask.dmi') && (bodyshape & BODYSHAPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION))
var/snout_icon_file = worn_item.worn_icon_muzzled || SNOUTED_MASK_FILE
if(snout_icon_file && icon_exists(snout_icon_file, RESOLVE_ICON_STATE(worn_item)))
icon_file = snout_icon_file
Expand Down Expand Up @@ -633,7 +633,7 @@ There are several things that need to be remembered:

// NOVA EDIT ADDITION
var/mutant_override = FALSE
if(bodytype & BODYTYPE_CUSTOM)
if(bodyshape & BODYSHAPE_CUSTOM)
var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_MISC, back, src)
if(species_icon_file)
icon_file = species_icon_file
Expand Down
Loading

0 comments on commit d1b64b2

Please sign in to comment.