feat: Sælg fra = altid som standard; tom kilde afvises ikke ved Start (1.62.224)

Brugerønske: udkørsels-flows sælger som standard til enhver pris (0) i stedet for 90 % af
årets top; gemte flows beholder deres valg. sellAtValue holder 0 uden for 50-100-klemmen.
Fanen Udkørsel har Altid som første trin (review). In-game: mælke-flowet fra en tom tank
blev afvist med 'ingen vare valgt' — startkontrollen tæller nu valgte varer for tom kilde.
This commit is contained in:
2026-10-12 00:07:46 +02:00
parent 0fa83cb627
commit aa6b3bef27
10 changed files with 28 additions and 13 deletions
@@ -51,7 +51,7 @@ function SmartPickupFrame:flowCells(adEnv, run)
if row.kind == "outbound" then
local sells, stores = ADFlowView.policyUse(row.policies)
local parts = {}
if sells then table.insert(parts, row.sellAtPercent == 0 and i18n:getText("spu_flow_ruleSellAlways") or string.format(i18n:getText("spu_flow_ruleSell"), row.sellAtPercent or 90)) end
if sells then table.insert(parts, (row.sellAtPercent or 0) == 0 and i18n:getText("spu_flow_ruleSellAlways") or string.format(i18n:getText("spu_flow_ruleSell"), row.sellAtPercent)) end
if stores then table.insert(parts, string.format(i18n:getText("spu_flow_ruleStore"), row.storeAbovePercent or 80)) end
rule = table.concat(parts, ", ")
if row.collectRound then rule = rule .. ", " .. i18n:getText("spu_flow_round") end
@@ -139,6 +139,9 @@ function SmartPickupFrame:initialize()
self.returnBelowOption:setTexts(percentTexts)
self.sellAtSteps, self.storeAboveSteps = {}, {}
local sellTexts, storeTexts = {}, {}
-- 0 = sælg altid (standard): første trin, så fanen kan vise og vælge det (review 1.62.224)
table.insert(self.sellAtSteps, 0)
table.insert(sellTexts, self.i18n:getText("spu_sellAt_always"))
for percent = ADRuns.MIN_SELL_AT_PERCENT, ADRuns.MAX_SELL_AT_PERCENT, 5 do
table.insert(self.sellAtSteps, percent)
table.insert(sellTexts, string.format("%d %%", percent))