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:
2026-09-24 02:19:30 +02:00
parent a11c8e46df
commit 3227453392
12 changed files with 144 additions and 57 deletions
+9
View File
@@ -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