feat(udkørsel): 'Lager til' — tvunget aflæsningssted pr. flow (siloer/egne fabrikker; første med plads og vej), XML #storeBuildings (v1.18.0.0)

This commit is contained in:
2026-09-24 05:13:09 +02:00
parent c814557ae1
commit d0485caa33
16 changed files with 169 additions and 11 deletions
+14
View File
@@ -147,6 +147,20 @@ function ADRunsController.getPickupMarkers()
return result
end
-- "Lager til": aflæsningsmarkører for flowets valgte lagerbygninger, i valgt rækkefølge (tom = ingen tvang).
function ADRunsController.getStoreMarkers(adEnv, run)
local result = {}
if ADBuildings == nil or run == nil then return result end
local farmId = g_currentMission ~= nil and g_currentMission.getFarmId ~= nil and g_currentMission:getFarmId() or 1
for _, buildingId in ipairs(run.storeBuildingIds or {}) do
local building = ADBuildings.find(adEnv, farmId, buildingId)
if building ~= nil and building.unloadMarker ~= nil then
table.insert(result, building.unloadMarker.id)
end
end
return result
end
-- ---- køretøjsnavne ----
ADRunsController.NAME_INTERVAL_MS = 2000