mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #1273 from CHOMPStationBot/upstream-merge-9543
[MIRROR] [MIRROR] Space cleaner cleans mobs
This commit is contained in:
@@ -465,3 +465,82 @@
|
||||
clear_alert("handcuffed")
|
||||
update_action_buttons() //some of our action buttons might be unusable when we're handcuffed.
|
||||
update_inv_handcuffed()
|
||||
|
||||
// Clears blood overlays
|
||||
/mob/living/carbon/clean_blood()
|
||||
. = ..()
|
||||
if(src.r_hand)
|
||||
src.r_hand.clean_blood()
|
||||
if(src.l_hand)
|
||||
src.l_hand.clean_blood()
|
||||
if(src.back)
|
||||
if(src.back.clean_blood())
|
||||
src.update_inv_back(0)
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/washgloves = 1
|
||||
var/washshoes = 1
|
||||
var/washmask = 1
|
||||
var/washears = 1
|
||||
var/washglasses = 1
|
||||
|
||||
if(H.wear_suit)
|
||||
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
|
||||
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
|
||||
|
||||
if(H.head)
|
||||
washmask = !(H.head.flags_inv & HIDEMASK)
|
||||
washglasses = !(H.head.flags_inv & HIDEEYES)
|
||||
washears = !(H.head.flags_inv & HIDEEARS)
|
||||
|
||||
if(H.wear_mask)
|
||||
if (washears)
|
||||
washears = !(H.wear_mask.flags_inv & HIDEEARS)
|
||||
if (washglasses)
|
||||
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
|
||||
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
H.update_inv_head()
|
||||
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
H.update_inv_wear_suit()
|
||||
|
||||
else if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
H.update_inv_w_uniform()
|
||||
|
||||
if(H.gloves && washgloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0)
|
||||
|
||||
if(H.shoes && washshoes)
|
||||
if(H.shoes.clean_blood())
|
||||
H.update_inv_shoes(0)
|
||||
|
||||
if(H.wear_mask && washmask)
|
||||
if(H.wear_mask.clean_blood())
|
||||
H.update_inv_wear_mask(0)
|
||||
|
||||
if(H.glasses && washglasses)
|
||||
if(H.glasses.clean_blood())
|
||||
H.update_inv_glasses(0)
|
||||
|
||||
if(H.l_ear && washears)
|
||||
if(H.l_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
|
||||
if(H.r_ear && washears)
|
||||
if(H.r_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
|
||||
if(H.belt)
|
||||
if(H.belt.clean_blood())
|
||||
H.update_inv_belt(0)
|
||||
|
||||
else
|
||||
if(src.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
|
||||
if(src.wear_mask.clean_blood())
|
||||
src.update_inv_wear_mask(0)
|
||||
|
||||
@@ -215,7 +215,6 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_back)
|
||||
src.back = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += back
|
||||
update_inv_back()
|
||||
if(slot_wear_mask)
|
||||
src.wear_mask = W
|
||||
@@ -223,7 +222,6 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
update_hair() //rebuild hair
|
||||
update_inv_ears()
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += wear_mask
|
||||
update_inv_wear_mask()
|
||||
if(slot_handcuffed)
|
||||
src.handcuffed = W
|
||||
@@ -243,7 +241,6 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_belt)
|
||||
src.belt = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += belt
|
||||
update_inv_belt()
|
||||
if(slot_wear_id)
|
||||
src.wear_id = W
|
||||
@@ -276,7 +273,6 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_gloves)
|
||||
src.gloves = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += glasses
|
||||
update_inv_gloves()
|
||||
if(slot_head)
|
||||
src.head = W
|
||||
@@ -287,22 +283,18 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(istype(W,/obj/item/clothing/head/kitty))
|
||||
W.update_icon(src)
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += head
|
||||
update_inv_head()
|
||||
if(slot_shoes)
|
||||
src.shoes = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += shoes
|
||||
update_inv_shoes()
|
||||
if(slot_wear_suit)
|
||||
src.wear_suit = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += wear_suit
|
||||
update_inv_wear_suit()
|
||||
if(slot_w_uniform)
|
||||
src.w_uniform = W
|
||||
W.equipped(src, slot)
|
||||
worn_clothing += w_uniform
|
||||
update_inv_w_uniform()
|
||||
if(slot_l_store)
|
||||
src.l_store = W
|
||||
|
||||
Reference in New Issue
Block a user