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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user