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
+7
View File
@@ -56,5 +56,12 @@ check("ST7 kun prod", S.rateText(0, 3600, fmt), "+3.6k")
check("ST7 kun forbrug", S.rateText(2000, 0, fmt), "-2.0k")
check("ST7 intet", S.rateText(0, 0, fmt), "-")
-- ST8: fane pr. bygningstype — filtrér inventar på kind, rækkefølgen bevares
local inv = {{kind = "silo", name = "A"}, {kind = "factory", name = "B"}, {kind = "silo", name = "C"}}
local silos = S.filterKind(inv, "silo")
check("ST8 to siloer", #silos, 2)
check("ST8 rækkefølge", silos[2].name, "C")
check("ST8 ingen stalde", #S.filterKind(inv, "husbandry"), 0)
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
os.exit(failures == 0 and 0 or 1)