feat(lagre): faner pr. bygningstype (Fabrikker/Siloer/Stalde/Palleskure), kolonner tilpasset rækkebredden, statistik tæller kun kørende produktioner × tidsjustering (v1.16.0.0)
This commit is contained in:
@@ -90,3 +90,12 @@ function ADStorageStats.rateText(consumption, production, format)
|
||||
if (production or 0) > 0 then table.insert(parts, "+" .. format(production)) end
|
||||
return #parts > 0 and table.concat(parts, " ") or "-"
|
||||
end
|
||||
|
||||
-- Bygninger af én type (fanerne Fabrikker/Siloer/Stalde/Palleskure); rækkefølgen bevares.
|
||||
function ADStorageStats.filterKind(inventory, kind)
|
||||
local result = {}
|
||||
for _, entry in ipairs(inventory or {}) do
|
||||
if entry.kind == kind then table.insert(result, entry) end
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user