Fixed stacks sometimes having the wrong amount if created on another stack
This commit is contained in:
@@ -111,13 +111,8 @@
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/DropFuel()
|
||||
if(sheets)
|
||||
var/fail_safe = FALSE
|
||||
while(sheets > 0 && fail_safe < 100)
|
||||
fail_safe += 1
|
||||
var/obj/item/stack/sheet/S = new sheet_path(loc)
|
||||
var/amount = min(sheets, S.max_amount)
|
||||
S.amount = amount
|
||||
sheets -= amount
|
||||
new sheet_path(drop_location(), sheets)
|
||||
sheets = 0
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/UseFuel()
|
||||
var/needed_sheets = 1 / (time_per_sheet * consumption / power_output)
|
||||
|
||||
@@ -191,12 +191,12 @@
|
||||
|
||||
// Give back the glass type we were supplied with
|
||||
/obj/item/solar_assembly/proc/give_glass(device_broken)
|
||||
var/atom/Tsec = drop_location()
|
||||
if(device_broken)
|
||||
new /obj/item/shard(loc)
|
||||
new /obj/item/shard(loc)
|
||||
new /obj/item/shard(Tsec)
|
||||
new /obj/item/shard(Tsec)
|
||||
else if(glass_type)
|
||||
var/obj/item/stack/sheet/S = new glass_type(loc)
|
||||
S.amount = 2
|
||||
new glass_type(Tsec, 2)
|
||||
glass_type = null
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user