fix(flows): gamle mål der ikke længere er AD-markører (eller dublerer en valgt stald) ryddes fra forsynings-flows (v1.13.6.0)

This commit is contained in:
2026-09-24 00:47:04 +02:00
parent c60510ae0e
commit bb70170cf0
3 changed files with 14 additions and 1 deletions
+6
View File
@@ -328,6 +328,12 @@ function ADRunsController.resolveMarkers(adEnv, run)
if role == "load" and ADSources ~= nil and ADSources.identify ~= nil then
local source = ADSources.identify(adEnv, wayPointId, farmId)
keep = source ~= nil and not (source.placeable ~= nil and chosenPlaceables[source.placeable])
elseif role == "unload" then
-- mål skal være en AD-MARKØR med aflæsningsstation (et slettet markør-id er kun et waypoint,
-- og AutoDrive kan ikke aflæsse dér); dubletter af valgte bygninger fjernes
local marker = adEnv.ADGraphManager.getMapMarkerByWayPointId ~= nil and adEnv.ADGraphManager:getMapMarkerByWayPointId(wayPointId) or nil
local station = marker ~= nil and ADSmartPickup.getUnloadStationAtWayPointId(adEnv, wayPointId, farmId) or nil
keep = station ~= nil and not (station.owningPlaceable ~= nil and chosenPlaceables[station.owningPlaceable])
end
seen[wayPointId] = true
if keep 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.13.5.0</version>
<version>1.13.6.0</version>
<title>
<en>AD Smart Pickup</en>
</title>