mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Update the autolathe UI, make it less laggy (#16521)
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user