chore(markarbejde): log hvorfor ingen maskine sendes ud (alle optaget/ingen med rollen/…) én gang pr. ændring — før kun i fanen (v1.36.7.0)
This commit is contained in:
@@ -27,6 +27,7 @@ ADFieldWork.REFILL_ROLES = {seeder = true, fertilizer = true, limer = true, weed
|
|||||||
local function log(...) ADFieldJobs.log(...) end
|
local function log(...) ADFieldJobs.log(...) end
|
||||||
local function note(...) ADFieldJobs.note(...) end
|
local function note(...) ADFieldJobs.note(...) end
|
||||||
local function now() return ADFieldJobs.now end
|
local function now() return ADFieldJobs.now end
|
||||||
|
local lastNoRig = {}
|
||||||
|
|
||||||
-- ---- AutoDrive ----
|
-- ---- AutoDrive ----
|
||||||
|
|
||||||
@@ -390,8 +391,15 @@ function ADFieldWork.dispatch(adEnv, field, info, decision)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
note(field.id, {reason = {key = "spu_field_reason_" .. tostring(why), role = role, args = args}, retryAt = now() + ADFieldWork.NO_RIG_RETRY_MS})
|
note(field.id, {reason = {key = "spu_field_reason_" .. tostring(why), role = role, args = args}, retryAt = now() + ADFieldWork.NO_RIG_RETRY_MS})
|
||||||
|
-- også i loggen (én gang pr. ændring): før stod grunden kun i fanen, og loggen var tavs (in-game 27/9)
|
||||||
|
local noRigKey = tostring(role) .. ":" .. tostring(why)
|
||||||
|
if lastNoRig[field.id] ~= noRigKey then
|
||||||
|
lastNoRig[field.id] = noRigKey
|
||||||
|
log(field.id, "ingen maskine sendt til %s: %s", tostring(role), tostring(why))
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
lastNoRig[field.id] = nil
|
||||||
local count = #rigs
|
local count = #rigs
|
||||||
local lanes = ADFieldModel.lanePositions(count)
|
local lanes = ADFieldModel.lanePositions(count)
|
||||||
for index, rig in ipairs(rigs) do
|
for index, rig in ipairs(rigs) do
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<modDesc descVersion="107">
|
<modDesc descVersion="107">
|
||||||
<author>masterdraco</author>
|
<author>masterdraco</author>
|
||||||
<version>1.36.6.0</version>
|
<version>1.36.7.0</version>
|
||||||
<title>
|
<title>
|
||||||
<en>AD Smart Pickup</en>
|
<en>AD Smart Pickup</en>
|
||||||
</title>
|
</title>
|
||||||
|
|||||||
Reference in New Issue
Block a user