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:
@@ -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()
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<text name="spu_noSources" text="(vælg mindst én kilde)"/>
|
||||
<text name="spu_noProducts" text="Kilderne har ingen varer endnu"/>
|
||||
<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_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"/>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<text name="spu_noSources" text="(choose at least one source)"/>
|
||||
<text name="spu_noProducts" text="The sources hold no goods yet"/>
|
||||
<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_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"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.12.11.0</version>
|
||||
<version>1.12.12.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user