fix(lagre): 'rækker til' regnes på nettoforbrug (+ 'stiger'), bredere beholdningskolonne, kort tooltip (v1.16.1.0)

This commit is contained in:
2026-09-24 02:48:54 +02:00
parent 3227453392
commit ac9dfe0d62
9 changed files with 34 additions and 18 deletions
+8 -1
View File
@@ -15,7 +15,7 @@ check("ST1 procent", st.percent, 83)
check("ST1 værdi nu", st.valueNow, 240000)
check("ST1 værdi top", st.valueTop, 300000)
check("ST1 gårdens beholdning", st.farmTotal, 412000)
check("ST1 dage", math.floor(st.days * 10 + 0.5) / 10, 3.2)
check("ST1 dage på netto (412k / 82k)", math.floor(st.days * 10 + 0.5) / 10, 5.0)
check("ST1 netto pr. døgn", st.net, -82000)
-- ST2: ingen salgssted, intet forbrug, ingen kapacitet
@@ -63,5 +63,12 @@ check("ST8 to siloer", #silos, 2)
check("ST8 rækkefølge", silos[2].name, "C")
check("ST8 ingen stalde", #S.filterKind(inv, "husbandry"), 0)
-- ST9: produktion ≥ forbrug -> beholdningen stiger, ingen dage
local rising = S.itemStats({fillType = 8, level = 1000, capacity = 2000}, 6700000, {consumption = 11500000, production = 19200000}, nil)
check("ST9 stiger -> dage nil", rising.days, nil)
check("ST9 stiger-flag", rising.rising, true)
check("ST1 falder -> ikke stiger", st.rising, false)
check("ST2 intet forbrug -> ikke stiger", st2.rising, false)
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
os.exit(failures == 0 and 0 or 1)