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>