Repository navigation
Cutscene and IFF tables: scope +nocreate to its own entry - #8079
Open
AdmiralTolwyn wants to merge 1 commit into
Open
AdmiralTolwyn wants to merge 1 commit into
AdmiralTolwyn wants to merge 1 commit into
Conversation
parse_cutscene_table() and parse_iff_table() declared create_if_not_found once per file. After one +nocreate entry in a modular table, every later entry naming a new cutscene or IFF was skipped. Declare the flag inside the per-entry loop, as the other +nocreate parsers do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a
-csn.tbmor-iff.tbm, once an entry uses+nocreate, every later entry in the same file that names a new cutscene or IFF is silently skipped. Both parsers declare the creation flag once per file,+nocreatesets it to false, and nothing sets it back. This declares it inside the per-entry loop, as the other+nocreateparsers already do (medals, scoring, nebula and props in the loop; ships, weapons, AI classes and others in a per-entry parse function). No other parser has the same problem.What mods could notice: new entries after a
+nocreateentry in the same modular table now load. A+nocreateentry that names a missing cutscene or IFF is still skipped, and base tables are unaffected.Testing
Unknownwith+nocreatebefore it addsPirate, then ends with a+nocreateentry for an IFF that does not exist. Against master's parsers both tests fail because the new entry is missing.OptionsManagerOverride.ShadowRenderMethodDefaultFollowsTheGlobal, unrelated).-csn.tbmand an-iff.tbmof the same shape, read back by a Lua hook at the main menu: master skipped the new cutscene and the new IFF; this PR loads both. The+nocreateentries for missing targets stay absent in both.