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
+2 -7
View File
@@ -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)
+4 -4
View File
@@ -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