Fixed stacks sometimes having the wrong amount if created on another stack
This commit is contained in:
@@ -367,8 +367,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
|
||||
fuel = new /obj/item/stack/sheet/mineral/plasma(src)
|
||||
fuel.amount = 0
|
||||
fuel = new /obj/item/stack/sheet/mineral/plasma(src, 0)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/detach()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -472,8 +471,7 @@
|
||||
var/rad_per_cycle = 3
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
|
||||
fuel.amount = 0
|
||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src, 0)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
|
||||
return
|
||||
|
||||
@@ -301,8 +301,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/Initialize()
|
||||
. = ..()
|
||||
cable = new(src)
|
||||
cable.amount = 0
|
||||
cable = new(src, 0)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/can_attach(obj/mecha/working/M)
|
||||
if(..())
|
||||
@@ -333,8 +332,7 @@
|
||||
if(to_load)
|
||||
to_load = min(target.amount, to_load)
|
||||
if(!cable)
|
||||
cable = new(src)
|
||||
cable.amount = 0
|
||||
cable = new(src, 0)
|
||||
cable.amount += to_load
|
||||
target.use(to_load)
|
||||
occupant_message("<span class='notice'>[to_load] meters of cable successfully loaded.</span>")
|
||||
@@ -358,8 +356,7 @@
|
||||
m = min(m, cable.amount)
|
||||
if(m)
|
||||
use_cable(m)
|
||||
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
||||
CC.amount = m
|
||||
new /obj/item/stack/cable_coil(get_turf(chassis), m)
|
||||
else
|
||||
occupant_message("There's no more cable on the reel.")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user