New stacks now auto-split if amount > max_amount

This commit is contained in:
YPOQ
2018-05-09 13:53:47 -06:00
parent 2b141c3e39
commit 6327b79db6
4 changed files with 9 additions and 20 deletions
+5 -1
View File
@@ -36,7 +36,11 @@
/obj/item/stack/Initialize(mapload, new_amount=null , merge = TRUE)
. = ..()
if(new_amount)
amount = new_amount
if(new_amount > max_amount)
amount = max_amount
new type(loc, new_amount - max_amount, merge)
else
amount = new_amount
if(!merge_type)
merge_type = type
if(merge)