From 55677ea370a8c0182aac56ef6dd7fd95f4c78b2b Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Tue, 12 Apr 2016 21:52:22 +0100 Subject: [PATCH 1/3] Make the floor wet when you empty the extinguisher --- code/game/objects/items/weapons/extinguisher.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 21eed445b28..b22eb00cc30 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -160,5 +160,7 @@ /obj/item/weapon/extinguisher/proc/EmptyExtinguisher(var/mob/user) if(loc == user && reagents.total_volume) reagents.clear_reagents() + loc.MakeSlippery(TURF_WET_WATER) + user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "You quietly empty out \the [src] using its release valve.") return From 01a3d0e761306593012f7a98b320b4ed32717558 Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Wed, 13 Apr 2016 11:25:11 +0100 Subject: [PATCH 2/3] Added help to extinguisher/attack but bugged It's not triggering the afterattack proc to spray the water... --- code/game/objects/items/weapons/extinguisher.dm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index b22eb00cc30..9b6203996b8 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -46,6 +46,17 @@ user << "The safety is [safety ? "on" : "off"]." return +/obj/item/weapon/extinguisher/attack(mob/M, mob/user) + if(user.a_intent == "help") + // If we're in help intent, don't bash anyone with the + // extinguisher + user.visible_message("[user] targets [M] with \the [src]", "You target [M] with \the [src].") + // FIXME the fire extinguisher isn't triggering, don't know + // why + return 0 + else + return ..() + /obj/item/weapon/extinguisher/examine(mob/user) ..() if(reagents.total_volume) @@ -160,7 +171,11 @@ /obj/item/weapon/extinguisher/proc/EmptyExtinguisher(var/mob/user) if(loc == user && reagents.total_volume) reagents.clear_reagents() - loc.MakeSlippery(TURF_WET_WATER) + + var/turf/T = get_turf(loc) + if(istype(T, /turf/open)) + var/turf/open/theturf = T + theturf.MakeSlippery(TURF_WET_WATER) user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "You quietly empty out \the [src] using its release valve.") return From 64f5f1a08ea6c5d58976224ba6ee1f81e7b56c4b Mon Sep 17 00:00:00 2001 From: Jack Edge Date: Wed, 13 Apr 2016 18:17:00 +0100 Subject: [PATCH 3/3] Removed check preventing self target extinguisher The comment on this code segment implies it's to stop the fire extinguisher from going off when put in a bag. Except it doesn't go off when put in a bag, even without this code check. As such, it was stopping self targeting with a fire extinguisher. Make sure the safety is off though! --- code/game/objects/items/weapons/extinguisher.dm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 9b6203996b8..ebc4bbfbc44 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -51,9 +51,7 @@ // If we're in help intent, don't bash anyone with the // extinguisher user.visible_message("[user] targets [M] with \the [src]", "You target [M] with \the [src].") - // FIXME the fire extinguisher isn't triggering, don't know - // why - return 0 + return 1 else return ..() @@ -88,8 +86,6 @@ /obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag) //TODO; Add support for reagents in water. - if(target.loc == user || !check_allowed_items(target)) //No more spraying yourself when putting your extinguisher away - return var/Refill = AttemptRefill(target, user) if(Refill) return