chore: diagnose af kædens behov ved for få marker (v1.62.107)
This commit is contained in:
@@ -465,6 +465,18 @@ function ADChain.notifyUncovered(last)
|
||||
count = count + 1
|
||||
local text = ADChain.uncoveredText(entry, last.titles, textOf)
|
||||
Logging.info(ADChain.LOG_PREFIX .. "ikke marker nok: %s", text)
|
||||
-- diagnose: hvem kræver varen (rødder med cyklusser), og hvad æder dyrene
|
||||
pcall(function()
|
||||
local parts = {}
|
||||
for _, root in ipairs(last.chain.roots or {}) do
|
||||
table.insert(parts, string.format("%s %.0f cykl.", tostring(root.key), root.cycles or -1))
|
||||
end
|
||||
local animals = {}
|
||||
for name, perMonth in pairs((last.data or {}).animalDemand or {}) do table.insert(animals, string.format("%s %.0f", name, perMonth)) end
|
||||
Logging.info(ADChain.LOG_PREFIX .. " diagnose %s: behov %.0f l/md, lager %.0f l | rødder: %s | dyr: %s", tostring(entry.key),
|
||||
(last.chain.fieldDemand or {})[entry.key] or (last.chain.fieldDemand or {})[entry.fruit] or 0,
|
||||
((last.data or {}).stock or {})[entry.key] or 0, table.concat(parts, ", "), table.concat(animals, ", "))
|
||||
end)
|
||||
if ADFieldJobs ~= nil and ADFieldJobs.notify ~= nil then ADFieldJobs.notify(text, true) end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<modDesc descVersion="107">
|
||||
<author>masterdraco</author>
|
||||
<version>1.62.106.0</version>
|
||||
<version>1.62.107.0</version>
|
||||
<title>
|
||||
<en>AD Smart Pickup</en>
|
||||
</title>
|
||||
|
||||
Reference in New Issue
Block a user