From 9ef1eb66555b3b7b0a1d9ad0b2b30563ad79142b Mon Sep 17 00:00:00 2001 From: masterdraco Date: Sat, 26 Sep 2026 18:02:30 +0200 Subject: [PATCH] =?UTF-8?q?fix(markarbejde):=20p=C3=A5fyldning=20fra=20g?= =?UTF-8?q?=C3=A5rdens=20eget=20lager=20f=C3=B8r=20k=C3=B8bestation=20(gyl?= =?UTF-8?q?le=20blev=20k=C3=B8bt=20trods=207=20mio.=20l=20ved=20BGA)=20(v1?= =?UTF-8?q?.29.6.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FS25_ADSmartPickup/adFieldWork.lua | 6 +++++- FS25_ADSmartPickup/modDesc.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/FS25_ADSmartPickup/adFieldWork.lua b/FS25_ADSmartPickup/adFieldWork.lua index 5179c98..9a513bc 100644 --- a/FS25_ADSmartPickup/adFieldWork.lua +++ b/FS25_ADSmartPickup/adFieldWork.lua @@ -441,15 +441,19 @@ function ADFieldWork.findRefillMarker(adEnv, vehicle, fillType, x, z) best, bestDistance = wayPointId, distance end end + -- gårdens egne lagre først (stalde/tanke med gylle, lager med gødning): købes kun når intet eget findes + -- (in-game 26/9: 7 mio. l gylle ved BGA'en, men påfyldningen ville købe ved købestationen) pcall(function() for _, station in pairs(g_currentMission.storageSystem:getLoadingStations()) do local supported = station.getAISupportedFillTypes ~= nil and station:getAISupportedFillTypes() or {} - if g_currentMission.accessHandler:canFarmAccess(farmId, station) and supported[fillType] + local isShop = station.owningPlaceable ~= nil and station.owningPlaceable.spec_buyingStation ~= nil + if not isShop and g_currentMission.accessHandler:canFarmAccess(farmId, station) and supported[fillType] and (station:getFillLevel(fillType, farmId) or 0) > 0 then consider(markerAtStation(adEnv, vehicle, station, station.owningPlaceable)) end end end) + if best ~= nil then return best end pcall(function() for _, placeable in pairs(g_currentMission.placeableSystem.placeables) do local spec = placeable.spec_buyingStation diff --git a/FS25_ADSmartPickup/modDesc.xml b/FS25_ADSmartPickup/modDesc.xml index 2d85c78..4b6982a 100644 --- a/FS25_ADSmartPickup/modDesc.xml +++ b/FS25_ADSmartPickup/modDesc.xml @@ -1,7 +1,7 @@ masterdraco - 1.29.5.0 + 1.29.6.0 <en>AD Smart Pickup</en>