From 90c485355fe7d10fa54430afe23e796fb9cf923c Mon Sep 17 00:00:00 2001 From: VampyrBytes Date: Fri, 12 Feb 2016 11:37:19 +0000 Subject: [PATCH] Fixes plastic bags suffocating when they shouldn't (#3577) As title. Now checks your head slot for the bag rather than relying on a variable that might not be reset in time --- code/game/objects/items/weapons/storage/bags.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 6af8207c163..7a1107cce1d 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -89,7 +89,6 @@ display_contents_with_number = 0 //or else this will lead to stupid behavior. can_hold = list() // any cant_hold = list("/obj/item/weapon/disk/nuclear") - var/head = 0 /obj/item/weapon/storage/bag/plasticbag/mob_can_equip(M as mob, slot) @@ -101,20 +100,19 @@ /obj/item/weapon/storage/bag/plasticbag/equipped(var/mob/user, var/slot) if(slot==slot_head) - head = 1 storage_slots = 0 processing_objects.Add(src) return /obj/item/weapon/storage/bag/plasticbag/process() - if(is_equipped() && head) + if(is_equipped()) if(ishuman(loc)) var/mob/living/carbon/human/H = loc - if(H.internal) - return - H.losebreath += 1 + if(H.get_item_by_slot(slot_head) == src) + if(H.internal) + return + H.losebreath += 1 else - head = 0 storage_slots = 7 processing_objects.Remove(src) return