fix: P-/Connect-/Wait-markører er aldrig kilde for forsyningen (1.62.338)
In-game 18/10 18:57: 'P Stor Ledig 2' ved Farma 500-siloen — tre flows sendte traktorer på P-pladsen efter hø.
This commit is contained in:
@@ -406,10 +406,25 @@ local function husbandryLoadIds(adEnv, farmId)
|
||||
end
|
||||
ADSmartPickup.husbandryLoadIds = husbandryLoadIds -- til test
|
||||
|
||||
-- Må markøren være en kilde? Parkering (P …), kobling (Connect …) og ventepladser aldrig (in-game 18/10 18:57:
|
||||
-- bunkerbåsen "P Stor Ledig 2" stod ved et lagers læssestation — tre flows sendte traktorer på P-pladsen efter hø).
|
||||
-- Samme regel som salgsstederne (ADFieldWork.isServiceMarker: "P …", "Connect …", wait i navn eller mappe).
|
||||
local serviceWarned = false
|
||||
function ADSmartPickup.isSourceMarker(marker)
|
||||
if ADFieldWork == nil or ADFieldWork.isServiceMarker == nil then
|
||||
if not serviceWarned then
|
||||
serviceWarned = true
|
||||
Logging.warning(ADSmartPickup.LOG_PREFIX .. "servicemarkør-reglen mangler — P-/Connect-/Wait-markører kan blive kilder")
|
||||
end
|
||||
return true
|
||||
end
|
||||
return not ADFieldWork.isServiceMarker(marker)
|
||||
end
|
||||
|
||||
local function collectMarkerStations(adEnv, candidateMarkers, farmId, excludedPlaceable)
|
||||
local markerStations = {}
|
||||
for _, marker in pairs(candidateMarkers) do
|
||||
local wayPoint = adEnv.ADGraphManager:getWayPointById(marker.id)
|
||||
local wayPoint = ADSmartPickup.isSourceMarker(marker) and adEnv.ADGraphManager:getWayPointById(marker.id) or nil
|
||||
local station = wayPoint ~= nil and getLoadStationAtMarker(adEnv, wayPoint, farmId) or nil
|
||||
local isExcluded = station ~= nil and excludedPlaceable ~= nil and station.owningPlaceable == excludedPlaceable
|
||||
if station ~= nil and not isExcluded then
|
||||
|
||||
Reference in New Issue
Block a user