mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 16:21:30 +02:00
Add Gold save-editor support, rearrange the launcher, and ship a patch-notes modal.
The save editor now routes Gold vs RBY through a generation adapter so boxes, items, events, and maps write the right fields. The launcher layout is shuffled a bit, and patch notes can come from the updater, a packed file, or the iOS sidecar.
This commit is contained in:
@@ -91,7 +91,8 @@ function Catalog.scrapeEvents(scriptDir, headerPath, listFiles, extraDirs)
|
||||
end
|
||||
end
|
||||
|
||||
local dirs = { scriptDir }
|
||||
local dirs = {}
|
||||
if scriptDir then dirs[#dirs + 1] = scriptDir end
|
||||
for _, dir in ipairs(extraDirs or {}) do
|
||||
dirs[#dirs + 1] = dir
|
||||
end
|
||||
@@ -110,4 +111,25 @@ function Catalog.scrapeEvents(scriptDir, headerPath, listFiles, extraDirs)
|
||||
return sortedKeys(found)
|
||||
end
|
||||
|
||||
function Catalog.goldEventList(extraDirs)
|
||||
local names = {}
|
||||
local ok, flags = pcall(require, "src.core.gen2.FlagNames")
|
||||
if ok and flags and flags.events then
|
||||
for name in pairs(flags.events) do
|
||||
names[#names + 1] = name
|
||||
end
|
||||
end
|
||||
table.sort(names)
|
||||
local modFlags = Catalog.scrapeEvents(nil, nil, nil, extraDirs)
|
||||
local seen = {}
|
||||
for _, name in ipairs(names) do seen[name] = true end
|
||||
for _, name in ipairs(modFlags) do
|
||||
if not seen[name] then
|
||||
names[#names + 1] = name
|
||||
seen[name] = true
|
||||
end
|
||||
end
|
||||
return names
|
||||
end
|
||||
|
||||
return Catalog
|
||||
|
||||
Reference in New Issue
Block a user