feat: høstkontrakter — læs til kontraktens salgssted (1.62.209)

This commit is contained in:
2026-10-10 18:18:57 +02:00
parent ceca255fd4
commit e7bd0ad075
9 changed files with 104 additions and 20 deletions
+5
View File
@@ -299,6 +299,11 @@ end
function ADFieldWork.chooseStore(adEnv, field, info, vehicle, fillType)
local isReachable = function(markerId) return ADUnloadWait.hasRouteTo(adEnv, vehicle, markerId) end
local farmId = vehicle:getOwnerFarmId()
-- høstkontrakt: læssene skal til kontraktens salgssted (ADContracts), aldrig gårdens lager
if field.contract and field.contractSellIds ~= nil then
if #field.contractSellIds == 0 then return nil, "kontraktens salgssted har ingen AutoDrive-markør" end
return ADLoadSwap.findForcedDumpMarker(adEnv, vehicle, fillType, 1, field.contractSellIds, isReachable)
end
if #field.plan.storeBuildingIds > 0 then
local buildings = {}
for _, buildingId in ipairs(field.plan.storeBuildingIds) do