diff --git a/FS25_ADSmartPickup/adPrices.lua b/FS25_ADSmartPickup/adPrices.lua
index f60016e..ce34aad 100644
--- a/FS25_ADSmartPickup/adPrices.lua
+++ b/FS25_ADSmartPickup/adPrices.lua
@@ -66,9 +66,20 @@ end
-- Rigtige salgssteder: SellingStation der sælger (fabrikkers aflæsningsstationer er
-- også SellingStation-objekter, men med isSellingPoint = false) og vises i Priser-menuen.
+-- Fabrikkers og staldes egne indleveringer bruger også SellingStation-klassen (TMR-fabrikken
+-- endda med isSellingPoint = true) — de er mål for forsyning, aldrig markeder.
function ADPrices.isSellingStation(station)
- return station ~= nil and station.isa ~= nil and SellingStation ~= nil and station:isa(SellingStation) == true
- and station.isSellingPoint == true and not station.hideFromPricesMenu
+ if station == nil or station.isa == nil or SellingStation == nil or station:isa(SellingStation) ~= true then
+ return false
+ end
+ if station.isSellingPoint ~= true or station.hideFromPricesMenu then
+ return false
+ end
+ local placeable = station.owningPlaceable
+ if placeable ~= nil and (placeable.spec_productionPoint ~= nil or placeable.getHusbandryFillLevel ~= nil) then
+ return false
+ end
+ return true
end
local function getCurrentPeriod()
diff --git a/FS25_ADSmartPickup/l10n/l10n_da.xml b/FS25_ADSmartPickup/l10n/l10n_da.xml
index d963cfb..7c1a9c6 100644
--- a/FS25_ADSmartPickup/l10n/l10n_da.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_da.xml
@@ -88,7 +88,7 @@
-
+
diff --git a/FS25_ADSmartPickup/l10n/l10n_en.xml b/FS25_ADSmartPickup/l10n/l10n_en.xml
index 791cfb6..33c7f1d 100644
--- a/FS25_ADSmartPickup/l10n/l10n_en.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_en.xml
@@ -88,7 +88,7 @@
-
+
diff --git a/FS25_ADSmartPickup/modDesc.xml b/FS25_ADSmartPickup/modDesc.xml
index a83d7c2..e31352b 100644
--- a/FS25_ADSmartPickup/modDesc.xml
+++ b/FS25_ADSmartPickup/modDesc.xml
@@ -1,7 +1,7 @@
masterdraco
- 1.12.11.0
+ 1.12.12.0
AD Smart Pickup
diff --git a/tests/test_adPrices.lua b/tests/test_adPrices.lua
index 38c0445..3968781 100644
--- a/tests/test_adPrices.lua
+++ b/tests/test_adPrices.lua
@@ -47,6 +47,10 @@ check("P4 procent = kurven alene (stationens grundpris bruges ikke: den mangler
check("P4 er salgssted", ADPrices.isSellingStation(station), true)
check("P4 skjult = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, hideFromPricesMenu = true}), false)
check("P4 fabrik-station = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = false}), false)
+-- in-game (23/9): TMR-fabrikkens indlevering er en SellingStation med isSellingPoint=true -> blev regnet som marked
+check("P4 fabrikkens egen station = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {spec_productionPoint = {}}}), false)
+check("P4 staldens egen station = ikke salgssted", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {getHusbandryFillLevel = function() end}}), false)
+check("P4 rigtigt salgssted med placeable", ADPrices.isSellingStation({isa = function() return true end, isSellingPoint = true, owningPlaceable = {}}), true)
-- P5: uden stationens grundpris: kun kurven tæller (faktor nu ÷ faktor max)
local bare = {getEffectiveFillTypePrice = function() return 470 end}