fix: fabrikkers/staldes egne indleveringer er ikke salgssteder (TMR unLoad vistes som marked); tydeligere 'ingen vare valgt' (v1.12.12.0)

This commit is contained in:
2026-09-23 15:12:43 +02:00
parent 0d1e82983a
commit bb5deea899
5 changed files with 20 additions and 5 deletions
+13 -2
View File
@@ -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()