Fixes stacks, attempt 2 (#26633)

* this is hell pain

* fixes merge issues when cutting up various items

* adds early return to attackby
This commit is contained in:
chuga-git
2024-09-10 17:14:01 -05:00
committed by GitHub
parent 35740a27cc
commit f57ebfa1a0
4 changed files with 37 additions and 34 deletions
+1 -6
View File
@@ -62,12 +62,7 @@
if(seed)
seed_modifier = round(seed.potency / 25)
var/obj/item/stack/plank = new plank_type(user.loc, 1 + seed_modifier)
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)
ST.attackby(plank, user) //we try to transfer all old unfinished stacks to the new stack we created.
if(plank.amount > old_plank_amount)
to_chat(user, "<span class='notice'>You add the newly-formed [plank_name] to the stack. It now contains [plank.amount] [plank_name].</span>")
to_chat(user, "<span class='notice'>You add the newly-formed [plank_name] to the stack.</span>")
qdel(src)
if(CheckAccepted(W))