fix: forældet kilde-advarsel ryddes i flowets status (1.62.357)
This commit is contained in:
@@ -150,7 +150,12 @@ end
|
||||
|
||||
local function clearWarning(vehicle, key)
|
||||
if warned[vehicle] ~= nil then
|
||||
local text = warned[vehicle][key]
|
||||
warned[vehicle][key] = nil
|
||||
-- også flowets status, hvis det var denne advarsel (in-game 19/10: "kilde-markør 28536 …" stod i flowet efter
|
||||
-- indlæsningen, længe efter markøren var fulgt — status ryddes ellers kun, når en tur planlægges)
|
||||
local run = text ~= nil and getRun(vehicle) or nil
|
||||
if run ~= nil and getStatus(run).warning == text then getStatus(run).warning = nil end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -508,6 +513,12 @@ function ADOutbound.buildPlanInput(adEnv, run, vehicle)
|
||||
carriable[fillType] = true
|
||||
end
|
||||
local sources, sourcesById = {}, {}
|
||||
-- advarsler om kilder, der ikke længere er med (markøren blev fulgt/fjernet efter omnummerering), ryddes
|
||||
local current = {}
|
||||
for _, wayPointId in ipairs(run.sourceWayPointIds or {}) do current["source:" .. tostring(wayPointId)] = true end
|
||||
for key in pairs(warned[vehicle] or {}) do
|
||||
if string.sub(key, 1, 7) == "source:" and not current[key] then clearWarning(vehicle, key) end
|
||||
end
|
||||
for _, wayPointId in ipairs(run.sourceWayPointIds or {}) do
|
||||
local source = ADSources.identify(adEnv, wayPointId, farmId)
|
||||
if source == nil then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.62.356.0</version>
|
||||
<version>1.62.357.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user