cutting logs with a hatchet no longer produces runtimes by merging qdeleted stacks (#62060)

Runtime in stack.dm, 452: Stack merge attempted on qdeleted target stack.

it edits four lines instead of one because I removed them at first, then was too lazy to copypaste it from the code back in, and so hand typed it, and my propensity for adding spaces shone through
This commit is contained in:
Seris02
2021-10-16 19:32:02 -04:00
committed by GitHub
parent 5cc52030e4
commit 8f2b02ba3f
+4 -4
View File
@@ -57,12 +57,12 @@
var/seed_modifier = 0
if(seed)
seed_modifier = round(seed.potency / 25)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + seed_modifier)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + seed_modifier, FALSE)
var/old_plank_amount = plank.amount
for(var/obj/item/stack/ST in user.loc)
if(ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
for (var/obj/item/stack/ST in user.loc)
if (ST != plank && istype(ST, plank_type) && ST.amount < ST.max_amount)
ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
if(plank.amount > old_plank_amount)
if (plank.amount > old_plank_amount)
to_chat(user, span_notice("You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name]."))
qdel(src)