Skip to content

Conversation

@tinygiant98
Copy link
Contributor

This commit modifies the method in which nwn_script_comp searches ResMan to deliver the desired ResRef. Previous behavior allowed for the ResMan.containers set to be mutatated in
nwn_script_comp::serviceRmDemand when the deferred code was run as the scope expired. This caused the containers within the containers set to reorder, seemingly at random, losing the load order as specified by the user, potentially causing script compilation issues, specifically with user-defined files that shadow big-sourced files.

Testing

Tested this change against the PRC repo, which contains multiple local files that override game/bif-sourced includes, such as x2_inc_spellhook.nss. Previous to this change, ResMan.containers was mutated when the serviceRmDemand scope was exited, causing unexpected container order when demanding resrefs. After this change, the container order remains unchanged.

Changelog

Fixed

script_comp: fixed resman container set order mutability issue which prevented locally overriden files from being properly served by resman.

Licence

  • I am licencing my change under the project's MIT licence, including all changes to GPL-3.0 licenced parts of the codebase.

This commit modifies the method in which nwn_script_comp searches ResMan
to deliver the desired ResRef.  Previous behavior allowed for the
ResMan.containers set to be mutatated in
`nwn_script_comp::serviceRmDemand` when the deferred code was run as the
scope expired.  This caused the containers within the containers set to
reorder, seemingly at random, losing the load order as specified by the
user, potentially causing script compilation issues, specifically with
user-defined files that shadow big-sourced files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant