From f5a00dcc2841d5c2313c707e5417c944f1a09223 Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 22 May 2015 08:43:57 -0400 Subject: [PATCH] Fixes match attack proc and processing Fixes their missing attack proc (used to light others' cigarettes) and matches still processing (and creating hotspots) after being dropped. --- code/game/objects/items/weapons/lighters.dm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 04dccdc4da1..acb4adbe1c7 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -193,4 +193,21 @@ item_state = "cigoff" name = "burnt match" desc = "A match. This one has seen better days." - return ..() \ No newline at end of file + processing_objects.Remove(src) + return ..() + +/obj/item/weapon/match/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + if(!isliving(M)) + return ..() + if(lit == 1) M.IgniteMob() + if(!istype(M, /mob)) + return ..() + + if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit == 1) + var/obj/item/clothing/mask/cigarette/cig = M.wear_mask + if(M == user) + cig.attackby(src, user) + else + cig.light("[user] holds the [name] out for [M], and lights the [cig.name].") + else + ..()