This commit is contained in:
SandPoot
2024-01-06 17:36:02 -03:00
parent cb2251ea37
commit 76e7ffc80d
10 changed files with 53 additions and 54 deletions
+10 -1
View File
@@ -42,6 +42,9 @@
var/matter_amount = 0
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
if(is_cyborg && istype(loc, /obj/item/robot_module))
prepare_estorage(loc)
if(new_amount != null)
amount = new_amount
while(amount > max_amount)
@@ -383,7 +386,9 @@
if(check && zero_amount())
return FALSE
if (is_cyborg)
return source.use_charge(used * cost)
. = source.use_charge(used * cost)
update_icon()
return
if (amount < used)
return FALSE
amount -= used
@@ -539,3 +544,7 @@
/obj/item/stack/microwave_act(obj/machinery/microwave/M)
if(istype(M) && M.dirty < 100)
M.dirty += amount
/obj/item/stack/proc/prepare_estorage(obj/item/robot_module/module)
if(source)
source = module.get_or_create_estorage(source)