fix: høstkontraktens tømmevogn afleverer rest på salgsstedet; kør igen kun når det kan hjælpe (1.62.361)
This commit is contained in:
@@ -62,6 +62,14 @@ function ADContracts.needsAnotherPass(completion, passes)
|
||||
return type(completion) == "number" and completion < 0.999 and (passes or 0) < ADContracts.MAX_PASSES
|
||||
end
|
||||
|
||||
-- Kan en ny omgang hjælpe? Kun hvis der står afgrøde tilbage (høst/slåning: mindst 5 % af marken står). Andre trin
|
||||
-- (pløj, kultivér, så …): målingen kan ikke se forskel på "næsten" og "helt" — en omgang mere er ufarlig.
|
||||
ADContracts.STANDING_MIN = 0.05
|
||||
function ADContracts.passCanHelp(stage, info)
|
||||
if stage ~= "harvesting" and stage ~= "mowing" then return true end
|
||||
return info ~= nil and type(info.standingRatio) == "number" and info.standingRatio >= ADContracts.STANDING_MIN
|
||||
end
|
||||
|
||||
-- Kontraktens fremdrift (0-1+, 1 = klar) eller nil.
|
||||
function ADContracts.completionOf(field)
|
||||
local mission = field ~= nil and field.contractMission or nil
|
||||
|
||||
Reference in New Issue
Block a user