From 4789f000909f62e7f962bdec178ca4dd7516a67b Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:26:45 -0600 Subject: [PATCH] makes paper stack burning more consistent (#22849) * makes paper stack burning more consistent * Update code/modules/paperwork/paper_bundle.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/paperwork/paper_bundle.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * Update code/modules/paperwork/paper_bundle.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/paperwork/paper_bundle.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> * reviews --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/modules/paperwork/paper_bundle.dm | 32 +++++++++++--------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 6cf5eeda4e9..21afc9c66b3 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -53,7 +53,7 @@ to_chat(user, "You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].") user.unEquip(W) W.loc = src - else if(istype(W, /obj/item/lighter)) + else if(is_hot(W)) burnpaper(W, user) else if(istype(W, /obj/item/paper_bundle)) user.unEquip(W) @@ -77,29 +77,23 @@ add_fingerprint(usr) return -/obj/item/paper_bundle/proc/burnpaper(obj/item/lighter/P, mob/user) - var/class = "" +/obj/item/paper_bundle/proc/burnpaper(obj/item/heating_object, mob/user) + var/class = "warning" - if(P.lit && !user.restrained()) - if(istype(P, /obj/item/lighter/zippo)) - class = "" + if(istype(heating_object, /obj/item/lighter/zippo)) + class = "rose" - user.visible_message("[class][user] holds [P] up to [src], it looks like [user.p_theyre()] trying to burn it!", \ - "[class]You hold [P] up to [src], burning it slowly.") + user.visible_message("[user] holds [heating_object] up to [src], it looks like [user.p_theyre()] trying to burn it!", "You hold [heating_object] up to [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(!do_after(user, 2 SECONDS, target = src) || !is_hot(heating_object)) + return + user.visible_message("[user] burns right through [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ + "You burn right through [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") - if(user.is_in_inactive_hand(src)) - user.unEquip(src) + user.unEquip(src) - new /obj/effect/decal/cleanable/ash(get_turf(src)) - qdel(src) - - else - to_chat(user, "You must hold \the [P] steady to burn \the [src].") + new /obj/effect/decal/cleanable/ash(get_turf(src)) + qdel(src) /obj/item/paper_bundle/examine(mob/user) . = ..()