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 -- Rigtige salgssteder: SellingStation der sælger (fabrikkers aflæsningsstationer er
-- også SellingStation-objekter, men med isSellingPoint = false) og vises i Priser-menuen. -- 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) function ADPrices.isSellingStation(station)
return station ~= nil and station.isa ~= nil and SellingStation ~= nil and station:isa(SellingStation) == true if station == nil or station.isa == nil or SellingStation == nil or station:isa(SellingStation) ~= true then
and station.isSellingPoint == true and not station.hideFromPricesMenu 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 end
local function getCurrentPeriod() local function getCurrentPeriod()
+1 -1
View File
@@ -88,7 +88,7 @@
<text name="spu_noSources" text="(vælg mindst én kilde)"/> <text name="spu_noSources" text="(vælg mindst én kilde)"/>
<text name="spu_noProducts" text="Kilderne har ingen varer endnu"/> <text name="spu_noProducts" text="Kilderne har ingen varer endnu"/>
<text name="spu_reason_noSource" text="ingen genkendt kilde"/> <text name="spu_reason_noSource" text="ingen genkendt kilde"/>
<text name="spu_reason_noProducts" text="ingen vare valgt"/> <text name="spu_reason_noProducts" text="ingen vare valgt (sæt Lager/Salg på en vare ovenfor)"/>
<text name="spu_reason_noWaitPoint" text="intet Wait-punkt i puljen (markør i en mappe med 'Wait' i navnet)"/> <text name="spu_reason_noWaitPoint" text="intet Wait-punkt i puljen (markør i en mappe med 'Wait' i navnet)"/>
<text name="spu_reason_cargoNoTarget" text="lasten på vognen har intet mål (pris for lav / ingen silo) — tøm vognen"/> <text name="spu_reason_cargoNoTarget" text="lasten på vognen har intet mål (pris for lav / ingen silo) — tøm vognen"/>
<text name="spu_reason_needsAutoload" text="pallevarer kræver Universal Autoload på vognen"/> <text name="spu_reason_needsAutoload" text="pallevarer kræver Universal Autoload på vognen"/>
+1 -1
View File
@@ -88,7 +88,7 @@
<text name="spu_noSources" text="(choose at least one source)"/> <text name="spu_noSources" text="(choose at least one source)"/>
<text name="spu_noProducts" text="The sources hold no goods yet"/> <text name="spu_noProducts" text="The sources hold no goods yet"/>
<text name="spu_reason_noSource" text="no recognised source"/> <text name="spu_reason_noSource" text="no recognised source"/>
<text name="spu_reason_noProducts" text="no good selected"/> <text name="spu_reason_noProducts" text="no good selected (set Store/Sell on a good above)"/>
<text name="spu_reason_noWaitPoint" text="no Wait point in the pool (marker in a folder with 'Wait' in its name)"/> <text name="spu_reason_noWaitPoint" text="no Wait point in the pool (marker in a folder with 'Wait' in its name)"/>
<text name="spu_reason_cargoNoTarget" text="the load on the trailer has no destination (price too low / no silo) — empty the trailer"/> <text name="spu_reason_cargoNoTarget" text="the load on the trailer has no destination (price too low / no silo) — empty the trailer"/>
<text name="spu_reason_needsAutoload" text="pallet goods need Universal Autoload on the trailer"/> <text name="spu_reason_needsAutoload" text="pallet goods need Universal Autoload on the trailer"/>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="107"> <modDesc descVersion="107">
<author>masterdraco</author> <author>masterdraco</author>
<version>1.12.11.0</version> <version>1.12.12.0</version>
<title> <title>
<en>AD Smart Pickup</en> <en>AD Smart Pickup</en>
</title> </title>
+4
View File
@@ -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 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 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) 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) -- P5: uden stationens grundpris: kun kurven tæller (faktor nu ÷ faktor max)
local bare = {getEffectiveFillTypePrice = function() return 470 end} local bare = {getEffectiveFillTypePrice = function() return 470 end}