Fixed stacks sometimes having the wrong amount if created on another stack

This commit is contained in:
Tad Hardesty
2018-05-10 23:23:51 -07:00
committed by letterjay
parent 20ac9089a7
commit 021f30f0c0
24 changed files with 174 additions and 112 deletions

View File

@@ -33,10 +33,13 @@
return
return TRUE
/obj/item/stack/Initialize(mapload, new_amount=null , merge = TRUE)
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
if(new_amount)
if(new_amount != null)
amount = new_amount
while(amount > max_amount)
amount -= max_amount
new type(loc, max_amount, FALSE)
if(!merge_type)
merge_type = type
if(merge)