mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #1273 from CHOMPStationBot/upstream-merge-9543
[MIRROR] [MIRROR] Space cleaner cleans mobs
This commit is contained in:
@@ -612,9 +612,6 @@ var/list/global/slot_flags_enumeration = list(
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(blood_overlay)
|
if(blood_overlay)
|
||||||
overlays.Remove(blood_overlay)
|
overlays.Remove(blood_overlay)
|
||||||
if(istype(src, /obj/item/clothing/gloves))
|
|
||||||
var/obj/item/clothing/gloves/G = src
|
|
||||||
G.transfer_blood = 0
|
|
||||||
|
|
||||||
/obj/item/reveal_blood()
|
/obj/item/reveal_blood()
|
||||||
if(was_bloodied && !fluorescent)
|
if(was_bloodied && !fluorescent)
|
||||||
|
|||||||
@@ -215,81 +215,13 @@
|
|||||||
L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
|
L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
|
||||||
|
|
||||||
if(iscarbon(O))
|
if(iscarbon(O))
|
||||||
var/mob/living/carbon/M = O
|
|
||||||
if(M.r_hand)
|
|
||||||
M.r_hand.clean_blood()
|
|
||||||
if(M.l_hand)
|
|
||||||
M.l_hand.clean_blood()
|
|
||||||
if(M.back)
|
|
||||||
if(M.back.clean_blood())
|
|
||||||
M.update_inv_back(0)
|
|
||||||
|
|
||||||
//flush away reagents on the skin
|
//flush away reagents on the skin
|
||||||
|
var/mob/living/carbon/M = O
|
||||||
if(M.touching)
|
if(M.touching)
|
||||||
var/remove_amount = M.touching.maximum_volume * M.reagent_permeability() //take off your suit first
|
var/remove_amount = M.touching.maximum_volume * M.reagent_permeability() //take off your suit first
|
||||||
M.touching.remove_any(remove_amount)
|
M.touching.remove_any(remove_amount)
|
||||||
|
|
||||||
if(ishuman(M))
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
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(0)
|
|
||||||
if(H.wear_suit)
|
|
||||||
if(H.wear_suit.clean_blood())
|
|
||||||
H.update_inv_wear_suit(0)
|
|
||||||
else if(H.w_uniform)
|
|
||||||
if(H.w_uniform.clean_blood())
|
|
||||||
H.update_inv_w_uniform(0)
|
|
||||||
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)
|
|
||||||
H.clean_blood(washshoes)
|
|
||||||
else
|
|
||||||
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
|
|
||||||
if(M.wear_mask.clean_blood())
|
|
||||||
M.update_inv_wear_mask(0)
|
|
||||||
M.clean_blood()
|
M.clean_blood()
|
||||||
else
|
|
||||||
O.clean_blood()
|
|
||||||
|
|
||||||
if(isturf(loc))
|
if(isturf(loc))
|
||||||
var/turf/tile = loc
|
var/turf/tile = loc
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
// Aurora forensics port.
|
// Aurora forensics port.
|
||||||
/obj/item/clothing/clean_blood()
|
/obj/item/clothing/clean_blood()
|
||||||
..()
|
. = ..()
|
||||||
gunshot_residue = null
|
gunshot_residue = null
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +55,12 @@
|
|||||||
verbs |= /obj/item/clothing/proc/change_color
|
verbs |= /obj/item/clothing/proc/change_color
|
||||||
//VOREStation edit start
|
//VOREStation edit start
|
||||||
|
|
||||||
|
/obj/item/clothing/update_icon()
|
||||||
|
overlays.Cut() //This removes all the overlays on the sprite and then goes down a checklist adding them as required.
|
||||||
|
if(blood_DNA)
|
||||||
|
add_blood()
|
||||||
|
. = ..()
|
||||||
|
|
||||||
/obj/item/clothing/equipped(var/mob/user,var/slot)
|
/obj/item/clothing/equipped(var/mob/user,var/slot)
|
||||||
..()
|
..()
|
||||||
if(enables_planes)
|
if(enables_planes)
|
||||||
@@ -366,6 +372,11 @@
|
|||||||
return
|
return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/obj/item/clothing/gloves/clean_blood()
|
||||||
|
. = ..()
|
||||||
|
transfer_blood = 0
|
||||||
|
update_icon()
|
||||||
|
|
||||||
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE)
|
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = FALSE)
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
|
|
||||||
@@ -685,9 +696,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/item/clothing/shoes/update_icon()
|
/obj/item/clothing/shoes/update_icon()
|
||||||
overlays.Cut() //This removes all the overlays on the sprite and then goes down a checklist adding them as required.
|
. = ..()
|
||||||
if(blood_DNA)
|
|
||||||
add_blood()
|
|
||||||
if(holding)
|
if(holding)
|
||||||
overlays += image(icon, "[icon_state]_knife")
|
overlays += image(icon, "[icon_state]_knife")
|
||||||
if(contaminated)
|
if(contaminated)
|
||||||
@@ -698,7 +707,6 @@
|
|||||||
if(ismob(usr))
|
if(ismob(usr))
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
M.update_inv_shoes()
|
M.update_inv_shoes()
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/clothing/shoes/clean_blood()
|
/obj/item/clothing/shoes/clean_blood()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|||||||
@@ -465,3 +465,82 @@
|
|||||||
clear_alert("handcuffed")
|
clear_alert("handcuffed")
|
||||||
update_action_buttons() //some of our action buttons might be unusable when we're handcuffed.
|
update_action_buttons() //some of our action buttons might be unusable when we're handcuffed.
|
||||||
update_inv_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)
|
if(slot_back)
|
||||||
src.back = W
|
src.back = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += back
|
|
||||||
update_inv_back()
|
update_inv_back()
|
||||||
if(slot_wear_mask)
|
if(slot_wear_mask)
|
||||||
src.wear_mask = W
|
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_hair() //rebuild hair
|
||||||
update_inv_ears()
|
update_inv_ears()
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += wear_mask
|
|
||||||
update_inv_wear_mask()
|
update_inv_wear_mask()
|
||||||
if(slot_handcuffed)
|
if(slot_handcuffed)
|
||||||
src.handcuffed = W
|
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)
|
if(slot_belt)
|
||||||
src.belt = W
|
src.belt = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += belt
|
|
||||||
update_inv_belt()
|
update_inv_belt()
|
||||||
if(slot_wear_id)
|
if(slot_wear_id)
|
||||||
src.wear_id = W
|
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)
|
if(slot_gloves)
|
||||||
src.gloves = W
|
src.gloves = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += glasses
|
|
||||||
update_inv_gloves()
|
update_inv_gloves()
|
||||||
if(slot_head)
|
if(slot_head)
|
||||||
src.head = W
|
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))
|
if(istype(W,/obj/item/clothing/head/kitty))
|
||||||
W.update_icon(src)
|
W.update_icon(src)
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += head
|
|
||||||
update_inv_head()
|
update_inv_head()
|
||||||
if(slot_shoes)
|
if(slot_shoes)
|
||||||
src.shoes = W
|
src.shoes = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += shoes
|
|
||||||
update_inv_shoes()
|
update_inv_shoes()
|
||||||
if(slot_wear_suit)
|
if(slot_wear_suit)
|
||||||
src.wear_suit = W
|
src.wear_suit = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += wear_suit
|
|
||||||
update_inv_wear_suit()
|
update_inv_wear_suit()
|
||||||
if(slot_w_uniform)
|
if(slot_w_uniform)
|
||||||
src.w_uniform = W
|
src.w_uniform = W
|
||||||
W.equipped(src, slot)
|
W.equipped(src, slot)
|
||||||
worn_clothing += w_uniform
|
|
||||||
update_inv_w_uniform()
|
update_inv_w_uniform()
|
||||||
if(slot_l_store)
|
if(slot_l_store)
|
||||||
src.l_store = W
|
src.l_store = W
|
||||||
|
|||||||
@@ -373,6 +373,11 @@
|
|||||||
color = "#A5F0EE"
|
color = "#A5F0EE"
|
||||||
touch_met = 50
|
touch_met = 50
|
||||||
|
|
||||||
|
/datum/reagent/space_cleaner/touch_mob(var/mob/M)
|
||||||
|
if(iscarbon(M))
|
||||||
|
var/mob/living/carbon/C = M
|
||||||
|
C.clean_blood()
|
||||||
|
|
||||||
/datum/reagent/space_cleaner/touch_obj(var/obj/O)
|
/datum/reagent/space_cleaner/touch_obj(var/obj/O)
|
||||||
O.clean_blood()
|
O.clean_blood()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user