From 1f54e93239ea32e2550efa493b7146eff392785e Mon Sep 17 00:00:00 2001 From: Markolie Date: Tue, 6 Jan 2015 02:17:14 +0100 Subject: [PATCH] Burnable photo, burn ash location fix --- code/modules/paperwork/paper.dm | 3 +-- code/modules/paperwork/photography.dm | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 69879c1766f..90c5c422ad8 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -305,13 +305,12 @@ if(user.get_inactive_hand() == src) user.drop_from_inventory(src) - new /obj/effect/decal/cleanable/ash(src.loc) + new /obj/effect/decal/cleanable/ash(get_turf(src)) del(src) else user << "\red You must hold \the [P] steady to burn \the [src]." - /obj/item/weapon/paper/Topic(href, href_list) ..() if(!usr || (usr.stat || usr.restrained())) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index a4f300b7b65..7829a112b0e 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -41,7 +41,33 @@ txt = copytext(txt, 1, 128) if(loc == user && user.stat == 0) scribble = txt + else if(istype(P, /obj/item/weapon/lighter)) + burnphoto(P, user) ..() + +/obj/item/weapon/photo/proc/burnphoto(obj/item/weapon/lighter/P, mob/user) + var/class = "" + + if(P.lit && !user.restrained()) + if(istype(P, /obj/item/weapon/lighter/zippo)) + class = "" + + user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \ + "[class]You hold \the [P] up to \the [src], burning it slowly.") + + spawn(20) + if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) + user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ + "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") + + if(user.get_inactive_hand() == src) + user.drop_from_inventory(src) + + new /obj/effect/decal/cleanable/ash(get_turf(src)) + del(src) + + else + user << "\red You must hold \the [P] steady to burn \the [src]." /obj/item/weapon/photo/examine(mob/user) if(in_range(usr, src) || istype(usr, /mob/dead/observer))