From 2e9e46839206593063d3930187e880a1a879fe63 Mon Sep 17 00:00:00 2001 From: Lacustat Date: Thu, 29 Oct 2026 16:09:04 +0100 Subject: [PATCH] 0.1.174: Sicht-Neuaufbau ohne Gesamtsortierung Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9 --- CodexShare.lua | 24 +++++++++++++++--------- Freewood-OctoWoW-Codex.toc | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CodexShare.lua b/CodexShare.lua index 4506af2..06191ed 100644 --- a/CodexShare.lua +++ b/CodexShare.lua @@ -2091,15 +2091,12 @@ local function Rebuild() end end -- Startdaten ganz unten (nach allen Absendern) - local bkeys = {} - for key in pairs(builtin.rec) do bkeys[#bkeys + 1] = key end - table.sort(bkeys) - for _, key in ipairs(bkeys) do - local rec = builtin.rec[key] - if rec.y == "x" then - xpRecs[#xpRecs + 1] = rec - elseif rec.y == "t" then - ttkRecs[#ttkRecs + 1] = rec + -- Reihenfolge ist nur bei den Erfahrungs- und Kampfdauer-Saetzen wichtig (wenige): diese werden nach Schluessel + -- sortiert angehaengt; alle anderen Startdaten brauchen keine Sortierung (je Schluessel nur ein Satz) + local sorted = {} + for key, rec in pairs(builtin.rec) do + if rec.y == "x" or rec.y == "t" then + sorted[#sorted + 1] = key elseif index[rec.y] then local bucket = index[rec.y] local cur = bucket[rec.id] @@ -2114,6 +2111,15 @@ local function Rebuild() end end end + table.sort(sorted) + for _, key in ipairs(sorted) do + local rec = builtin.rec[key] + if rec.y == "x" then + xpRecs[#xpRecs + 1] = rec + else + ttkRecs[#ttkRecs + 1] = rec + end + end view = { quests = {}, units = {}, objects = {}, ied = {}, xpb = db.xpb, names = db.names } for letter, field in pairs(KIND_OF) do local out = view[field] diff --git a/Freewood-OctoWoW-Codex.toc b/Freewood-OctoWoW-Codex.toc index 44be124..79df1d9 100644 --- a/Freewood-OctoWoW-Codex.toc +++ b/Freewood-OctoWoW-Codex.toc @@ -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.173 +## Version: 0.1.174 ## Dependencies: Freewood-OctoWoW-Core ## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData