feat(flow-guide): listen over traktorer der ikke kan bruges er foldet sammen som standard; linjen med antallet folder ud/ind (v1.36.6.0)
This commit is contained in:
@@ -143,6 +143,13 @@ local function setPolicy(products, name, policy)
|
||||
end
|
||||
|
||||
function ADFlowGuide.choose(guide, id, value)
|
||||
if id == "showBlocked" then
|
||||
-- visning, ikke en del af flowet: fold listen over traktorer der ikke kan bruges ud/ind
|
||||
local copy = {}
|
||||
for key, field in pairs(guide) do copy[key] = field end
|
||||
copy.showBlocked = not guide.showBlocked
|
||||
return copy
|
||||
end
|
||||
local draft = ADGuide.deepCopy(guide.draft)
|
||||
if SET_VALUES[id] then
|
||||
draft[id] = value
|
||||
@@ -328,10 +335,13 @@ local function rowsTractors(guide)
|
||||
if #rows == 0 then table.insert(rows, text("spu_guide_flow_noTractors")) end
|
||||
if other > 0 then table.insert(rows, text("spu_guide_flow_otherFlows", {other})) end
|
||||
if blocked > 0 then
|
||||
table.insert(rows, text("spu_guide_flow_blocked", {blocked}))
|
||||
-- navn + grund (fx "X ingen vogn"), så man kan se hvorfor en traktor ikke kan vælges
|
||||
table.sort(blockedTexts)
|
||||
for _, line in ipairs(blockedTexts) do table.insert(rows, {type = "text", label = T(" " .. line)}) end
|
||||
-- foldet sammen som standard; linjen med antallet folder navn + grund ud/ind
|
||||
local key = guide.showBlocked and "spu_guide_flow_blockedHide" or "spu_guide_flow_blockedShow"
|
||||
table.insert(rows, {type = "link", id = "showBlocked", value = true, label = L(key, {blocked})})
|
||||
if guide.showBlocked then
|
||||
table.sort(blockedTexts)
|
||||
for _, line in ipairs(blockedTexts) do table.insert(rows, {type = "text", label = T(" " .. line)}) end
|
||||
end
|
||||
end
|
||||
return rows
|
||||
end
|
||||
|
||||
@@ -451,6 +451,8 @@
|
||||
<text name="spu_guide_flow_storeAutoText" text=" Lagerturene kører til nærmeste lager med plads."/>
|
||||
<text name="spu_guide_flow_noTractors" text=" Ingen ledige traktorer"/>
|
||||
<text name="spu_guide_flow_otherFlows" text=" %d traktorer kører i andre flows og vises ikke"/>
|
||||
<text name="spu_guide_flow_blockedShow" text=" %d traktorer kan ikke bruges her (vognen passer ikke) — klik for at se hvorfor"/>
|
||||
<text name="spu_guide_flow_blockedHide" text=" %d traktorer kan ikke bruges her — klik for at skjule"/>
|
||||
<text name="spu_guide_flow_blocked" text=" %d traktorer kan ikke bruges her (vognen passer ikke)"/>
|
||||
<text name="spu_guide_flow_none" text="ingen valgt"/>
|
||||
<text name="spu_guide_flow_goodsAuto" text="Automatisk"/>
|
||||
|
||||
@@ -451,6 +451,8 @@
|
||||
<text name="spu_guide_flow_storeAutoText" text=" Storage trips go to the nearest store with room."/>
|
||||
<text name="spu_guide_flow_noTractors" text=" No free tractors"/>
|
||||
<text name="spu_guide_flow_otherFlows" text=" %d tractors run in other flows and are hidden"/>
|
||||
<text name="spu_guide_flow_blockedShow" text=" %d tractors cannot be used here (trailer does not fit) — click to see why"/>
|
||||
<text name="spu_guide_flow_blockedHide" text=" %d tractors cannot be used here — click to hide"/>
|
||||
<text name="spu_guide_flow_blocked" text=" %d tractors cannot be used here (trailer does not fit)"/>
|
||||
<text name="spu_guide_flow_none" text="none chosen"/>
|
||||
<text name="spu_guide_flow_goodsAuto" text="Automatic"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.36.5.0</version>
|
||||
<version>1.36.6.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user