mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
[MIRROR] sane stacks (#11533)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
Selis
parent
4797afe137
commit
a272557ccd
@@ -234,9 +234,7 @@
|
||||
var/recursive = amount == -1 ? 1 : 0
|
||||
var/datum/material/matdata = get_material_by_name(material_name)
|
||||
var/stack_type = matdata.stack_type
|
||||
var/obj/item/stack/material/S = new stack_type(loc)
|
||||
if(amount <= 0)
|
||||
amount = S.max_amount
|
||||
var/obj/item/stack/material/S = new stack_type(loc, -1)
|
||||
var/ejected = min(round(stored_material[material_name] / S.perunit), amount)
|
||||
if(!S.set_amount(min(ejected, amount)))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user