diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 74b5ef0396..a611eeb3fa 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -131,11 +131,17 @@ #define NORMAL_SUIT_STYLE 0 #define DIGITIGRADE_SUIT_STYLE 1 +//Tauric Specific suits #define NOT_TAURIC 0 #define SNEK_TAURIC 1 #define PAW_TAURIC 2 #define HOOF_TAURIC 3 +//Helmets/masks for muzzles or beaks +#define NORMAL_FACED 0 +#define MUZZLE_FACED 1 +#define BEAKED_FACED 2 + //flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts #define NO_MUTANTRACE_VARIATION 0 #define MUTANTRACE_VARIATION 1 diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 6a3082b558..8894a793c1 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -8,6 +8,8 @@ var/blockTracking = 0 //For AI tracking var/can_toggle = null dynamic_hair_suffix = "+generic" + var/muzzle_var = NORMAL_STYLE + mutantrace_variation = MUTANTRACE_VARIATION /obj/item/clothing/head/Initialize() . = ..() @@ -15,6 +17,18 @@ var/mob/living/carbon/human/H = loc H.update_hair() +/obj/item/clothing/head/equipped(mob/user, slot) + ..() + if(ishuman(user)) + var/mob/living/carbon/human/H = user + + if(mutantrace_variation) + if(("mam_snout" in H.dna.species.mutant_bodyparts) && (H.dna.features["mam_snout"] != "None")) + muzzle_var = ALT_STYLE + else if(muzzle_var == ALT_STYLE) + muzzle_var = NORMAL_STYLE + H.update_inv_head() + /obj/item/clothing/head/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index da3e114edd..436fa9bfb7 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -7,6 +7,8 @@ equip_delay_other = 40 var/mask_adjusted = 0 var/adjusted_flags = null + var/muzzle_var = NORMAL_STYLE + mutantrace_variation = MUTANTRACE_VARIATION /obj/item/clothing/mask/worn_overlays(isinhands = FALSE) @@ -18,6 +20,18 @@ IF_HAS_BLOOD_DNA(src) . += mutable_appearance('icons/effects/blood.dmi', "maskblood") +/obj/item/clothing/head/equipped(mob/user, slot) + ..() + if(ishuman(user)) + var/mob/living/carbon/human/H = user + + if(mutantrace_variation) + if(("mam_snout" in H.dna.species.mutant_bodyparts) && (H.dna.features["mam_snout"] != "None")) + muzzle_var = ALT_STYLE + else if(muzzle_var == ALT_STYLE) + muzzle_var = NORMAL_STYLE + H.update_inv_wear_mask() + /obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE) ..() if(ismob(loc)) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 71717bfc16..d697c5ca2e 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -324,13 +324,22 @@ There are several things that need to be remembered: /mob/living/carbon/human/update_inv_head() ..() update_mutant_bodyparts() - var/mutable_appearance/head_overlay = overlays_standing[HEAD_LAYER] - if(head_overlay) + if(head) remove_overlay(HEAD_LAYER) + var/obj/item/clothing/head/H = head + if(H.mutantrace_variation) + if(H.muzzle_var == ALT_STYLE) + H.alternate_worn_icon = 'modular_citadel/icons/mob/muzzled_mask.dmi' + else + H.alternate_worn_icon = null + + overlays_standing[HEAD_LAYER] = H.build_worn_icon(state = H.icon_state, default_layer = HEAD_LAYER, default_icon_file = ((head.alternate_worn_icon) ? H.alternate_worn_icon : 'icons/mob/head.dmi')) + var/mutable_appearance/head_overlay = overlays_standing[HEAD_LAYER] + if(OFFSET_HEAD in dna.species.offset_features) head_overlay.pixel_x += dna.species.offset_features[OFFSET_HEAD][1] head_overlay.pixel_y += dna.species.offset_features[OFFSET_HEAD][2] - overlays_standing[HEAD_LAYER] = head_overlay + overlays_standing[HEAD_LAYER] = head_overlay apply_overlay(HEAD_LAYER) /mob/living/carbon/human/update_inv_belt() @@ -429,13 +438,22 @@ There are several things that need to be remembered: /mob/living/carbon/human/update_inv_wear_mask() ..() - var/mutable_appearance/mask_overlay = overlays_standing[FACEMASK_LAYER] - if(mask_overlay) + if(wear_mask) + var/obj/item/clothing/mask/M = wear_mask remove_overlay(FACEMASK_LAYER) + if(M.mutantrace_variation) + if(M.muzzle_var == ALT_STYLE) + M.alternate_worn_icon = 'modular_citadel/icons/mob/muzzled_mask.dmi' + else + M.alternate_worn_icon = null + + overlays_standing[FACEMASK_LAYER] = M.build_worn_icon(state = wear_mask.icon_state, default_layer = FACEMASK_LAYER, default_icon_file = ((wear_mask.alternate_worn_icon) ? M.alternate_worn_icon : 'icons/mob/mask.dmi')) + var/mutable_appearance/mask_overlay = overlays_standing[FACEMASK_LAYER] + if(OFFSET_FACEMASK in dna.species.offset_features) mask_overlay.pixel_x += dna.species.offset_features[OFFSET_FACEMASK][1] mask_overlay.pixel_y += dna.species.offset_features[OFFSET_FACEMASK][2] - overlays_standing[FACEMASK_LAYER] = mask_overlay + overlays_standing[FACEMASK_LAYER] = mask_overlay apply_overlay(FACEMASK_LAYER) update_mutant_bodyparts() //e.g. upgate needed because mask now hides lizard snout diff --git a/modular_citadel/icons/mob/muzzled_helmet.dmi b/modular_citadel/icons/mob/muzzled_helmet.dmi new file mode 100644 index 0000000000..6023314f82 Binary files /dev/null and b/modular_citadel/icons/mob/muzzled_helmet.dmi differ diff --git a/modular_citadel/icons/mob/muzzled_mask.dmi b/modular_citadel/icons/mob/muzzled_mask.dmi new file mode 100644 index 0000000000..69b7917b18 Binary files /dev/null and b/modular_citadel/icons/mob/muzzled_mask.dmi differ