mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user