feat(marksilo): 'Kør overskud til produktion' — foder først: staldenes forbrug × valgt antal døgn bliver på gården, overskud køres til gårdens fabrikker (v1.44.0.0)
This commit is contained in:
@@ -29,5 +29,18 @@ check("record: x", back.maxVehicles, 4)
|
||||
check("record: tærskel", back.minLiters, 25000)
|
||||
check("tom record -> standard", C.fromRecord(nil).maxVehicles, 2)
|
||||
check("record uden tal -> standard tærskel", C.fromRecord({enabled = 1}).minLiters, 10000)
|
||||
-- kør til produktion + foderreserve
|
||||
check("standard: ikke til produktion", cfg.toProduction, false)
|
||||
check("standard foderreserve 7 døgn", cfg.reserveDays, 7)
|
||||
check("reserve snappes (10 -> 7)", C.with(cfg, {reserveDays = 10}).reserveDays, 7)
|
||||
check("reserve 40 -> 30", C.with(cfg, {reserveDays = 40}).reserveDays, 30)
|
||||
local prod = C.with(C.toggleStore(cfg, "a"), {toProduction = true, reserveDays = 14})
|
||||
check("with bevarer lagre", C.hasStore(prod, "a"), true)
|
||||
check("with muterer ikke (produktion)", cfg.toProduction, false)
|
||||
local prodBack = C.fromRecord(C.toRecord(prod))
|
||||
check("record: til produktion", prodBack.toProduction, true)
|
||||
check("record: foderreserve", prodBack.reserveDays, 14)
|
||||
check("gammel record uden felter -> standard", C.fromRecord({enabled = 1}).reserveDays, 7)
|
||||
check("toggleStore bevarer produktion", C.toggleStore(prod, "b").toProduction, true)
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
os.exit(failures == 0 and 0 or 1)
|
||||
|
||||
Reference in New Issue
Block a user