mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-09-26 13:33:27 -04:00
4010857a32
Add ROM-backed contextual L/R help with article navigation and safe pause/resume. Record recent field scenes and gameplay events for the skippable Continue recap, with playback isolated from live progress. Integrate extraction and cache validation, preserve bundled script flags during import, and cover navigation, persistence, event recording, playback isolation, and both ROM revisions with tests.
14 lines
849 B
Lua
14 lines
849 B
Lua
package.path='./?.lua;./?/init.lua;'..package.path
|
|
if not arg[1] then print('SKIP Quest Log ROM test: supply ROM path');return end
|
|
local imports=require('src.import.gba.file_io').makeImports(arg[1],'test')
|
|
local rom=assert(require('src.import.gba.rom').open(imports,'firered'))
|
|
local E=require('src.import.gba.quest_log_extract')
|
|
local p=E.read(rom)
|
|
assert(p.text.PreviouslyOnYourQuest:find('Previously on your quest',1,true))
|
|
assert(p.text.CeruleanCave=='CERULEAN CAVE',p.text.CeruleanCave)
|
|
assert(p.text.ArrivedInLocation=='Arrived in {S1}.',p.text.ArrivedInLocation)
|
|
assert(p.text.TookOnTrainersMonWithMonAndWon:find('{D4}',1,true))
|
|
local cache={write=function(self,_,v)self.value=v;return true end}
|
|
E.writeExtract(rom,cache);assert(loadstring(cache.value))()
|
|
imports:_close();print('PASS Quest Log ROM strings, placeholders, offsets and cache')
|