fix(markarbejde): utoppede kartofler (forberedelige stadier) tæller som høstklare; klargøring på en mark med uhøstet afgrøde spoles tilbage til klar (F16) (v1.34.2.0)
This commit is contained in:
@@ -105,5 +105,11 @@ check("J13 genvækst -> vent", dRegrow.action, "wait"); check("J13 grund", dRegr
|
||||
check("J13 genvækst men tur færdig -> slå hjørnet", J.decide(mowing, regrowing, {{phase = "finished"}}, 0).action, "dispatch")
|
||||
check("J13 halvt slået uden genvækst -> slå resten", J.decide(mowing, {id = 90, markerId = 9, mowable = true, readyRatio = 0.6, immatureRatio = 0}, {}, 0).action, "dispatch")
|
||||
|
||||
-- J14: kultivering på en mark med uhøstede kartofler (in-game 27/9 F16) -> tilbage til klar; rest efter høst -> ikke
|
||||
local cultivatingField = M.with(auto, {stage = "cultivating", kind = "harvest"})
|
||||
check("J14 uhøstet -> spol tilbage", J.decide(cultivatingField, {id = 16, markerId = 9, kind = "harvest", phase = "ready", readyRatio = 1}, {}, 0).action, "rewind")
|
||||
check("J14 høstrest 30 % -> kultiver", J.decide(cultivatingField, {id = 16, markerId = 9, kind = "harvest", phase = "ready", readyRatio = 0.3}, {}, 0).action ~= "rewind", true)
|
||||
check("J14 stub -> kultiver", J.decide(cultivatingField, {id = 16, markerId = 9, kind = "bare", phase = "cut", readyRatio = 0}, {}, 0).action ~= "rewind", true)
|
||||
|
||||
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
|
||||
os.exit(failures == 0 and 0 or 1)
|
||||
|
||||
@@ -70,5 +70,13 @@ check("F8 fuld højde tæller", F.isPrime(5, 4), true)
|
||||
check("F8 ukendt stadie tæller", F.isPrime(nil, 4), true)
|
||||
check("F8 ingen krav", F.isPrime(3, nil), true)
|
||||
|
||||
-- F9: kartofler (Dakota): 6 = klar men kun forberedelig, 10 = toppet (høstklar)
|
||||
local potato = {minHarvestingGrowthState = 10, maxHarvestingGrowthState = 10, minPreparingGrowthState = 6, maxPreparingGrowthState = 6, witheredState = 7, cutState = 8}
|
||||
check("F9 utoppet er forberedelig", F.isPreparable(6, potato), true)
|
||||
check("F9 voksende ikke", F.isPreparable(5, potato), false)
|
||||
check("F9 fase klar", F.growthPhase(6, potato), "ready")
|
||||
check("F9 toppet klar", F.growthPhase(10, potato), "ready")
|
||||
check("F9 ingen forberedelse", F.isPreparable(6, {minPreparingGrowthState = -1}), false)
|
||||
|
||||
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