mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 13:05:57 +00:00
Serve a mod's file named for another game version under its own name instead of leaving it out
A mod file whose name carries Product.<n> and which the RomFS lacks was counted as made for another game version and never served. The game does ask for such names: on 1.4.3 with mods on, the file trace (trace = fs) shows it opening Sound/Resource/Pack_MasterSword.Product.110.bars.zs, while its RomFS holds only the Product.140 and the unversioned file. A sound mod that ships its pack under all those names was silent here and works on a console, where LayeredFS shows the game every file of a mod. Such files are now added overlays like any other new file. Another version's resource size table is still not served and still lends its entries; the files are still counted, and the Mods tab and docs/mods.md now say they are read only when asked for by name. tests/mods_romfs_check.py gets a case for it. Not run here: the test and --probe-fs need a build and the game's files. runtime/romfs.c compiles with llvm-mingw. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgQM2zwuVagwScByEJhT8V
This commit is contained in:
6 files changed
+32
-15
No files matched your search
@@ -152,13 +152,15 @@ def main():
|
||||
put(mods, UNI, p2, b'mod-G')
|
||||
# a file of another game version's (no RomFS has a Product.999 table): counted, never served
|
||||
put(mods, 'Low', 'System/Resource/ResourceSizeTable.Product.999.rsizetable.zs', b'mod-H')
|
||||
# any other file named for another version: counted, and served under its name as an added file
|
||||
put(mods, 'Case', 'Sound/Resource/Named.Product.999.bars', b'mod-J')
|
||||
put(mods, 'Lite', 'Lite/added.bin', b'mod-I', part='romfslite') # TKMM's romfslite folder
|
||||
|
||||
code, log = run(args.exe, mods, f'Top|Low|{UNI}|Case')
|
||||
check(code == 0, 'probe-fs passes with five mods (served bytes equal the winners\' files)', log)
|
||||
for line in ('mods: Top: 2 files served (1 replaced, 1 added), 0 overridden',
|
||||
'mods: Low: 1 files served (1 replaced, 0 added), 2 overridden by Top, 1 for another game version',
|
||||
'mods: Case: 0 files served (0 replaced, 0 added), 1 overridden by Top',
|
||||
'mods: Case: 1 files served (0 replaced, 1 added), 1 overridden by Top, 1 for another game version',
|
||||
f'mods: {UNI}: 0 files served (0 replaced, 0 added), 1 overridden by Low',
|
||||
'mods: Lite: 1 files served (0 replaced, 1 added), 0 overridden'):
|
||||
check(line in log, line, log)
|
||||
|
||||
Reference in new issue
Block a user