Burnable photo, burn ash location fix

This commit is contained in:
Markolie
2015-01-06 02:17:14 +01:00
parent 6ce5b379e4
commit 1f54e93239
2 changed files with 27 additions and 2 deletions
+1 -2
View File
@@ -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()))
+26
View File
@@ -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 = "<span class='warning'>"
if(P.lit && !user.restrained())
if(istype(P, /obj/item/weapon/lighter/zippo))
class = "<span class='rose'>"
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))