fix(marksilo): tom silo — lånt vogn med last ved en tom marksilo kører resten til fabrik (plads til hele resten) ellers gårdlager; AD-ture fra marksiloer overtages igen efter genindlæsning (v1.50.4.0)
This commit is contained in:
@@ -129,5 +129,20 @@ check("R2 alle hvede-vogne holdt tilbage", #left, 1)
|
||||
check("R3 intet behov -> alle fri", #P.withoutHarvestReserve(vs, {}), 3)
|
||||
check("R4 input muteres ikke", #vs, 3)
|
||||
|
||||
-- Tom silo: lånt vogn med last står ved en tom marksilo -> resten køres videre (AD venter ellers til fuld)
|
||||
-- (in-game 28/9: Tømmevogn 2 og 4 stod ved tom F17 Unload med kartofler)
|
||||
local restState = {atSilo = true, stillMs = 45000, siloStock = 0, cargo = 12000}
|
||||
check("RS1 tom silo med last -> kør videre", P.restDue(restState), true)
|
||||
check("RS2 siloen har stadig varer -> vent", P.restDue({atSilo = true, stillMs = 45000, siloStock = 30000, cargo = 12000}), false)
|
||||
check("RS3 ikke ved siloen -> nej", P.restDue({atSilo = false, stillMs = 45000, siloStock = 0, cargo = 12000}), false)
|
||||
check("RS4 lige ankommet -> vent", P.restDue({atSilo = true, stillMs = 5000, siloStock = 0, cargo = 12000}), false)
|
||||
check("RS5 tom vogn -> nej", P.restDue({atSilo = true, stillMs = 45000, siloStock = 0, cargo = 0}), false)
|
||||
local restStores = {
|
||||
{id = "fab", kind = "production", markerId = 1, x = 10, z = 0, free = {[10] = 5000}},
|
||||
{id = "gaard", kind = "silo", markerId = 2, x = 500, z = 0, free = {[10] = 900000}},
|
||||
}
|
||||
check("RS6 fabrik uden plads til hele resten -> gårdsilo", P.restStore(restStores, {x = 0, z = 0}, 10, 12000).id, "gaard")
|
||||
check("RS7 fabrik med plads -> fabrik", P.restStore(restStores, {x = 0, z = 0}, 10, 4000).id, "fab")
|
||||
check("RS8 intet tager varen", P.restStore(restStores, {x = 0, z = 0}, 99, 4000), nil)
|
||||
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