0.1.141: Diagnose fuer empfangene Datensaetze (/fwcodex share)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-10-27 12:14:13 +01:00
co-authored by Claude Sonnet 5.5
parent 55c0415450
commit 1e804ad876
3 changed files with 36 additions and 1 deletions
+20
View File
@@ -1313,6 +1313,26 @@ function Share.RemoteStats()
return senders, records
end
-- Diagnose (/fwcodex share): empfangene Datensaetze je Absender und Art (u o q i x t p z g h f), Dev-Status, eigene Datensaetze je Art
function Share.RemoteInfo()
local out = {}
for name, s in pairs(Remote()) do
local by = {}
for _, rec in pairs(s.rec) do by[rec.y or "?"] = (by[rec.y or "?"] or 0) + 1 end
out[#out + 1] = { name = name, dev = IsDevSender(name) and true or false, n = s.n or 0, np = s.np or 0, by = by }
end
return out
end
function Share.OwnInfo()
local by = {}
for _, e in ipairs(Share.Scan(false) or {}) do
local l = tostring(e.key):sub(1, 1)
by[l] = (by[l] or 0) + 1
end
return by
end
-- Mitgelieferte Startdaten (nur im Speicher, nie gespeichert und nie gesendet): Schluessel -> Datensatz
local builtin = { rec = {}, n = 0 }
+15
View File
@@ -1202,6 +1202,21 @@ function Sync:Debug()
FW:Print("Gesendet nach Art: " .. Types(st.txType))
FW:Print("Empfangen nach Art: " .. Types(st.rxType))
FW:Print(string.format("Bekannte Spieler (letzte Stunde): %d", self:HeardCount()))
local function Letters(by)
local o = {}
for _, l in ipairs({ "u", "o", "q", "i", "x", "t", "p", "z", "g", "h", "f" }) do
if by[l] then o[#o + 1] = l .. "=" .. by[l] end
end
return #o > 0 and table.concat(o, " ") or "-"
end
FW:Print("Eigene Datensaetze nach Art: " .. Letters(Share.OwnInfo()))
for _, r in ipairs(Share.RemoteInfo()) do
FW:Print(string.format("Von %s: Dev %s, normal %d, Wege/Punkte %d | %s", tostring(r.name), r.dev and "ja" or "NEIN", r.n, r.np, Letters(r.by)))
end
if Codex.Spots then
FW:Print(string.format("Ortspunkte sichtbar: %d (davon empfangen: %d), Verbindungen empfangen: %d",
Codex.Spots.Count(), #Share.RemoteRecords("h"), #Share.RemoteRecords("g")))
end
end
function Sync:Stats()
+1 -1
View File
@@ -3,7 +3,7 @@
## Notes: Learns quests, creatures and drops while you play: who gives and takes a quest, rewards, objectives, drop chances.
## Notes-deDE: Lernt beim Spielen Quests, Kreaturen und Beute: wer eine Quest vergibt und annimmt, Belohnungen, Ziele, Drop-Chancen.
## Author: Lacustat
## Version: 0.1.140
## Version: 0.1.141
## Dependencies: Freewood-OctoWoW-Core
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData