mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
Fixes HIDEJUMPSUIT and HIDEGLOVES invis flags Edit: Now with HIDEEARS!!! (#27232)
* fix * HIDEEYES --------- Co-authored-by: Bmon <no@email.com>
This commit is contained in:
@@ -79,6 +79,8 @@
|
||||
update_inv_w_uniform()
|
||||
if(I.flags_inv & HIDESHOES)
|
||||
update_inv_shoes()
|
||||
if(I.flags_inv & HIDEGLOVES)
|
||||
update_inv_gloves()
|
||||
update_inv_wear_suit()
|
||||
else if(I == w_uniform)
|
||||
if(r_store)
|
||||
@@ -116,6 +118,8 @@
|
||||
var/obj/item/clothing/head/hat = I
|
||||
if(hat.vision_flags || hat.see_in_dark || !isnull(hat.lighting_alpha))
|
||||
update_sight()
|
||||
if(I.flags_inv & HIDEEARS)
|
||||
update_inv_ears()
|
||||
head_update(I)
|
||||
update_inv_head()
|
||||
update_misc_effects()
|
||||
@@ -139,6 +143,8 @@
|
||||
update_head_accessory()
|
||||
if(internal && !get_organ_slot("breathing_tube"))
|
||||
internal = null
|
||||
if(I.flags_inv & HIDEEARS)
|
||||
update_inv_ears()
|
||||
wear_mask_update(I, toggle_off = FALSE)
|
||||
sec_hud_set_ID()
|
||||
update_misc_effects()
|
||||
@@ -211,6 +217,8 @@
|
||||
update_head_accessory()
|
||||
if(length(hud_list))
|
||||
sec_hud_set_ID()
|
||||
if(wear_mask.flags_inv & HIDEEARS)
|
||||
update_inv_ears()
|
||||
wear_mask_update(I, toggle_off = TRUE)
|
||||
update_misc_effects()
|
||||
update_inv_wear_mask()
|
||||
@@ -281,6 +289,8 @@
|
||||
if(hat.vision_flags || hat.see_in_dark || !isnull(hat.lighting_alpha))
|
||||
update_sight()
|
||||
// this calls update_inv_head() on its own
|
||||
if(head.flags_inv & HIDEEARS)
|
||||
update_inv_ears()
|
||||
update_misc_effects()
|
||||
head_update(I)
|
||||
if(ITEM_SLOT_SHOES)
|
||||
@@ -288,8 +298,12 @@
|
||||
update_inv_shoes()
|
||||
if(ITEM_SLOT_OUTER_SUIT)
|
||||
wear_suit = I
|
||||
if(wear_suit.flags_inv & HIDEJUMPSUIT)
|
||||
update_inv_w_uniform()
|
||||
if(wear_suit.flags_inv & HIDESHOES)
|
||||
update_inv_shoes()
|
||||
if(wear_suit.flags_inv & HIDEGLOVES)
|
||||
update_inv_gloves()
|
||||
update_inv_wear_suit()
|
||||
if(ITEM_SLOT_JUMPSUIT)
|
||||
w_uniform = I
|
||||
|
||||
@@ -581,38 +581,40 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
if(w_uniform && istype(w_uniform, /obj/item/clothing/under))
|
||||
update_hud_uniform(w_uniform)
|
||||
|
||||
var/t_color = w_uniform.item_color
|
||||
if(!t_color)
|
||||
t_color = icon_state
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT))
|
||||
|
||||
var/mutable_appearance/standing = mutable_appearance('icons/mob/clothing/under/misc.dmi', "[t_color]_s", layer = -UNIFORM_LAYER)
|
||||
var/t_color = w_uniform.item_color
|
||||
if(!t_color)
|
||||
t_color = icon_state
|
||||
|
||||
if(w_uniform.icon_override)
|
||||
standing.icon = w_uniform.icon_override
|
||||
if(w_uniform.sprite_sheets)
|
||||
standing.icon = w_uniform.sprite_sheets["Human"]
|
||||
if(w_uniform.sprite_sheets[dna.species.sprite_sheet_name] && icon_exists(w_uniform.sprite_sheets[dna.species.sprite_sheet_name], "[t_color]_s"))
|
||||
standing.icon = w_uniform.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
var/mutable_appearance/standing = mutable_appearance('icons/mob/clothing/under/misc.dmi', "[t_color]_s", layer = -UNIFORM_LAYER)
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "uniformblood")
|
||||
bloodsies.color = w_uniform.blood_color
|
||||
standing.overlays += bloodsies
|
||||
if(w_uniform.icon_override)
|
||||
standing.icon = w_uniform.icon_override
|
||||
if(w_uniform.sprite_sheets)
|
||||
standing.icon = w_uniform.sprite_sheets["Human"]
|
||||
if(w_uniform.sprite_sheets[dna.species.sprite_sheet_name] && icon_exists(w_uniform.sprite_sheets[dna.species.sprite_sheet_name], "[t_color]_s"))
|
||||
standing.icon = w_uniform.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
|
||||
if(length(w_uniform.accessories)) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun:
|
||||
for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
|
||||
var/tie_color = A.item_color
|
||||
if(!tie_color)
|
||||
tie_color = A.icon_state
|
||||
if(A.icon_override)
|
||||
standing.overlays += image("icon" = A.icon_override, "icon_state" = "[A.icon_state]")
|
||||
else if(A.sprite_sheets && A.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
standing.overlays += image("icon" = A.sprite_sheets[dna.species.sprite_sheet_name], "icon_state" = "[A.icon_state]")
|
||||
else
|
||||
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
|
||||
standing.alpha = w_uniform.alpha
|
||||
standing.color = w_uniform.color
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
if(w_uniform.blood_DNA)
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "uniformblood")
|
||||
bloodsies.color = w_uniform.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
if(length(w_uniform.accessories)) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun:
|
||||
for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
|
||||
var/tie_color = A.item_color
|
||||
if(!tie_color)
|
||||
tie_color = A.icon_state
|
||||
if(A.icon_override)
|
||||
standing.overlays += image("icon" = A.icon_override, "icon_state" = "[A.icon_state]")
|
||||
else if(A.sprite_sheets && A.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
standing.overlays += image("icon" = A.sprite_sheets[dna.species.sprite_sheet_name], "icon_state" = "[A.icon_state]")
|
||||
else
|
||||
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
|
||||
standing.alpha = w_uniform.alpha
|
||||
standing.color = w_uniform.color
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
|
||||
else if(!dna.species.nojumpsuit)
|
||||
var/list/uniform_slots = list()
|
||||
@@ -671,22 +673,24 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
if(gloves)
|
||||
update_hud_gloves(gloves)
|
||||
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDEGLOVES))
|
||||
|
||||
var/mutable_appearance/standing
|
||||
if(gloves.icon_override)
|
||||
standing = mutable_appearance(gloves.icon_override, "[gloves.icon_state]", layer = -GLOVES_LAYER)
|
||||
else if(gloves.sprite_sheets && gloves.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
standing = mutable_appearance(gloves.sprite_sheets[dna.species.sprite_sheet_name], "[t_state]", layer = -GLOVES_LAYER)
|
||||
else
|
||||
standing = mutable_appearance('icons/mob/clothing/hands.dmi', "[t_state]", layer = -GLOVES_LAYER)
|
||||
var/t_state = gloves.item_state
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
|
||||
if(gloves.blood_DNA) // No need to check for hands here because we won't have gloves on.
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "bloodyhands")
|
||||
bloodsies.color = gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
var/mutable_appearance/standing
|
||||
if(gloves.icon_override)
|
||||
standing = mutable_appearance(gloves.icon_override, "[gloves.icon_state]", layer = -GLOVES_LAYER)
|
||||
else if(gloves.sprite_sheets && gloves.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
standing = mutable_appearance(gloves.sprite_sheets[dna.species.sprite_sheet_name], "[t_state]", layer = -GLOVES_LAYER)
|
||||
else
|
||||
standing = mutable_appearance('icons/mob/clothing/hands.dmi', "[t_state]", layer = -GLOVES_LAYER)
|
||||
|
||||
if(gloves.blood_DNA) // No need to check for hands here because we won't have gloves on.
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "bloodyhands")
|
||||
bloodsies.color = gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA) // Checks for hands to make sure we don't get mysterious floating blood.
|
||||
if(get_organ("l_hand"))
|
||||
@@ -755,28 +759,32 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
if(l_ear)
|
||||
update_hud_l_ear(l_ear)
|
||||
|
||||
var/left_ear_item_state = l_ear.item_state ? l_ear.item_state : l_ear.icon_state
|
||||
var/left_ear_icon = 'icons/mob/clothing/ears.dmi'
|
||||
if(l_ear.sprite_sheets && l_ear.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
left_ear_icon = l_ear.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
if(l_ear.icon_override)
|
||||
left_ear_item_state = "[left_ear_item_state]_l"
|
||||
left_ear_icon = l_ear.icon_override
|
||||
if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS)))
|
||||
|
||||
overlays_standing[LEFT_EAR_LAYER] = mutable_appearance(left_ear_icon, left_ear_item_state, layer = -LEFT_EAR_LAYER)
|
||||
var/left_ear_item_state = l_ear.item_state ? l_ear.item_state : l_ear.icon_state
|
||||
var/left_ear_icon = 'icons/mob/clothing/ears.dmi'
|
||||
if(l_ear.sprite_sheets && l_ear.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
left_ear_icon = l_ear.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
if(l_ear.icon_override)
|
||||
left_ear_item_state = "[left_ear_item_state]_l"
|
||||
left_ear_icon = l_ear.icon_override
|
||||
|
||||
overlays_standing[LEFT_EAR_LAYER] = mutable_appearance(left_ear_icon, left_ear_item_state, layer = -LEFT_EAR_LAYER)
|
||||
|
||||
if(r_ear)
|
||||
update_hud_r_ear(r_ear)
|
||||
|
||||
var/right_ear_item_state = r_ear.item_state ? r_ear.item_state : r_ear.icon_state
|
||||
var/right_ear_icon = 'icons/mob/clothing/ears.dmi'
|
||||
if(r_ear.sprite_sheets && r_ear.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
right_ear_icon = r_ear.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
if(r_ear.icon_override)
|
||||
right_ear_icon = "[right_ear_item_state]_l"
|
||||
right_ear_icon = r_ear.icon_override
|
||||
if((!head || !(head.flags_inv & HIDEEARS)) && (!wear_mask || !(wear_mask.flags_inv & HIDEEARS)))
|
||||
|
||||
overlays_standing[RIGHT_EAR_LAYER] = mutable_appearance(right_ear_icon, right_ear_item_state, layer = -RIGHT_EAR_LAYER)
|
||||
var/right_ear_item_state = r_ear.item_state ? r_ear.item_state : r_ear.icon_state
|
||||
var/right_ear_icon = 'icons/mob/clothing/ears.dmi'
|
||||
if(r_ear.sprite_sheets && r_ear.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
right_ear_icon = r_ear.sprite_sheets[dna.species.sprite_sheet_name]
|
||||
if(r_ear.icon_override)
|
||||
right_ear_icon = "[right_ear_item_state]_l"
|
||||
right_ear_icon = r_ear.icon_override
|
||||
|
||||
overlays_standing[RIGHT_EAR_LAYER] = mutable_appearance(right_ear_icon, right_ear_item_state, layer = -RIGHT_EAR_LAYER)
|
||||
|
||||
apply_overlay(LEFT_EAR_LAYER)
|
||||
apply_overlay(RIGHT_EAR_LAYER)
|
||||
|
||||
Reference in New Issue
Block a user