fix(udsendelse): fælles udsendelsesport for Start alle, markarbejde, marksiloer og flow-genstart; én indstilling under Indstillinger (v1.62.237)

This commit is contained in:
2026-10-16 02:01:12 +02:00
parent 7f063cbb06
commit fbc0b448f5
13 changed files with 97 additions and 69 deletions
-2
View File
@@ -78,7 +78,6 @@ function ADFieldStorage.save(state)
for id, on in pairs(state.resumed or {}) do if on then table.insert(resumedIds, tostring(id)) end end
table.sort(resumedIds)
xmlFile:setString(ADFieldStorage.ROOT .. "#resumed", table.concat(resumedIds, " "))
xmlFile:setInt(ADFieldStorage.ROOT .. "#dispatchGap", state.dispatchGapS or 15)
local vehicleIndex = 0
for vehicleId in pairs(state.fleet) do
xmlFile:setString(string.format("%s.fleet.vehicle(%d)#id", ADFieldStorage.ROOT, vehicleIndex), vehicleId)
@@ -125,7 +124,6 @@ function ADFieldStorage.load()
for token in tostring(xmlFile:getString(ADFieldStorage.ROOT .. "#resumed") or ""):gmatch("%S+") do
result.resumed[tonumber(token) or token] = true
end
result.dispatchGapS = xmlFile:getInt(ADFieldStorage.ROOT .. "#dispatchGap")
xmlFile:iterate(ADFieldStorage.ROOT .. ".field", function(_, key)
local field = ADFieldModel.fromRecord(ADFieldStorage.readRecord(xmlFile, key))
if field.id ~= nil then result.fields[field.id] = field end