Update the autolathe UI, make it less laggy (#16521)

This commit is contained in:
ShadowLarkens
2024-10-26 14:19:12 +02:00
committed by GitHub
parent 9e53689ec7
commit 4ebf8c4303
3 changed files with 194 additions and 130 deletions
+4 -1
View File
@@ -471,12 +471,15 @@
return materials[mat]
/// List format is list(list(name = ..., amount = ..., ref = ..., etc.), list(...))
/datum/component/material_container/tgui_data(mob/user)
/datum/component/material_container/tgui_data(mob/user, skip_empty = FALSE)
var/list/data = list()
for(var/datum/material/material as anything in materials)
var/amount = materials[material]
if(amount == 0 && skip_empty)
continue
data += list(list(
"name" = material.name,
"ref" = REF(material),