mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-30 19:57:01 +00:00
0.1.144: Wegenetz - Karten-ID per Zonenname aufloesen, Label zuruecksetzen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
eae43ba1d1
commit
5a209a3d8a
@@ -131,6 +131,37 @@ function API.CurrentMapID(cands)
|
||||
return id
|
||||
end
|
||||
end
|
||||
-- Zone ohne bekannte Daten (und noch nie betreten): Karten-ID ueber den Zonennamen suchen.
|
||||
-- Quelle: der Karten-Scan (db.cat.m), sonst alle Nummern 1..8000 durchprobieren. Ergebnis wird gemerkt (auch dauerhaft),
|
||||
-- ein Fehlschlag fuer 60 Sekunden.
|
||||
local now = _G.GetTime and _G.GetTime() or 0
|
||||
if API.noMatch and API.noMatch[key] and now - API.noMatch[key] < 60 then return nil end
|
||||
local zname
|
||||
if _G.GetMapContinents and _G.GetMapZones then
|
||||
if z == 0 then zname = ({ _G.GetMapContinents() })[c] else zname = ({ _G.GetMapZones(c) })[z] end
|
||||
end
|
||||
local target = Norm(zname)
|
||||
if target then
|
||||
local ids = {}
|
||||
local m = Codex.db and Codex.db.cat and Codex.db.cat.m
|
||||
if type(m) == "table" and next(m) then
|
||||
for id in pairs(m) do if type(id) == "number" then ids[#ids + 1] = id end end
|
||||
table.sort(ids)
|
||||
else
|
||||
for id = 1, 8000 do ids[#ids + 1] = id end
|
||||
end
|
||||
for i = 1, #ids do
|
||||
local id = ids[i]
|
||||
if Norm(MapName(id)) == target then
|
||||
zoneToID[key] = id
|
||||
resolved[id] = key
|
||||
Learned()[id] = key
|
||||
return id
|
||||
end
|
||||
end
|
||||
end
|
||||
API.noMatch = API.noMatch or {}
|
||||
API.noMatch[key] = now
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
+4
-1
@@ -473,7 +473,10 @@ function PM.Refresh()
|
||||
layer:Show()
|
||||
local mapID = CurrentMapID()
|
||||
local canvas = Canvas()
|
||||
if not (mapID and canvas) then return end
|
||||
if not (mapID and canvas) then
|
||||
label:SetText(FW.L.CODEX_PATHMAP_NONE) -- nicht die Zeile der vorherigen Karte stehen lassen
|
||||
return
|
||||
end
|
||||
local width, height = canvas:GetWidth() or 1, canvas:GetHeight() or 1
|
||||
if width < 2 or height < 2 then return end
|
||||
local res = PM.Compute(mapID)
|
||||
|
||||
@@ -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.143
|
||||
## Version: 0.1.144
|
||||
## Dependencies: Freewood-OctoWoW-Core
|
||||
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData
|
||||
|
||||
|
||||
Reference in New Issue
Block a user