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
+14
View File
@@ -443,5 +443,19 @@ check("S19b æg 100 høns × 30", rates3[EGG] and rates3[EGG].production, 3000)
check("S19b gødning via navn", rates3[MANURE_FT] and rates3[MANURE_FT].production, 1000)
check("S19b mælk uændret", rates3[MILK].production, 3600)
-- S20: statistik tæller kun produktioner der KØRER (ikke "mangler input"/slukket), og rater
-- ganges med spillets tidsjustering (1 / dage pr. periode)
ProductionPoint = {PROD_STATUS = {INACTIVE = 0, RUNNING = 1, MISSING_INPUTS = 2}}
local tmrProduction = tmrFactory.spec_productionPoint.productionPoint.productions[1]
tmrProduction.status = ProductionPoint.PROD_STATUS.MISSING_INPUTS
local idle = ADSources.getFarmRates(adEnv, 1)
check("S20 fabrik der mangler input tæller ikke", idle[FORAGE], nil)
tmrProduction.status = ProductionPoint.PROD_STATUS.RUNNING
g_currentMission.environment = {timeAdjustment = 0.5}
local running = ADSources.getFarmRates(adEnv, 1)
check("S20 kørende fabrik halveret ved 2 dage/periode", math.floor(running[FORAGE].production + 0.5), 576000)
check("S20 stald halveret", running[STRAW].consumption, 6000)
g_currentMission.environment, ProductionPoint = nil, nil
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
os.exit(failures == 0 and 0 or 1)