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:
2026-10-18 19:00:12 +02:00
parent fae9761f1a
commit f172e04880
5 changed files with 24 additions and 2 deletions
+16 -1
View File
@@ -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
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="107">
<author>masterdraco</author>
<version>1.62.337.0</version>
<version>1.62.338.0</version>
<title>
<en>AD Smart Pickup</en>
</title>