VS: Implicit list abuse

This commit is contained in:
Aronai Sieyes
2021-05-27 12:08:51 -04:00
parent 4cfdd72c02
commit 7d725e740b
12 changed files with 86 additions and 60 deletions
@@ -69,20 +69,21 @@
else
data["has_id"] = FALSE
data["ores"] = list()
var/list/ores = list()
for(var/ore in machine.ores_processing)
if(!machine.ores_stored[ore] && !show_all_ores)
continue
var/ore/O = GLOB.ore_data[ore]
if(!O)
continue
data["ores"].Add(list(list(
ores.Add(list(list(
"ore" = ore,
"name" = O.display_name,
"amount" = machine.ores_stored[ore],
"processing" = machine.ores_processing[ore] ? machine.ores_processing[ore] : 0,
)))
data["ores"] = ores
data["showAllOres"] = show_all_ores
data["power"] = machine.active
data["speed"] = machine.speed_process
@@ -37,13 +37,15 @@
/obj/machinery/mineral/stacking_unit_console/tgui_data(mob/user)
var/list/data = ..()
data["stacktypes"] = list()
var/list/stacktypes = list()
for(var/stacktype in machine.stack_storage)
if(machine.stack_storage[stacktype] > 0)
data["stacktypes"].Add(list(list(
stacktypes.Add(list(list(
"type" = stacktype,
"amt" = machine.stack_storage[stacktype],
)))
data["stacktypes"] = stacktypes
data["stackingAmt"] = machine.stack_amt
return data