IPC for the retrieval and monitoring of a CollectionCache's ResolvedFiles. (Effective Changes)#539
Open
CordeliaMist wants to merge 4 commits intoxivdev:masterfrom
Open
Conversation
Collaborator
|
These are some deep internals of Penumbras functionality. I am currently strongly against merging this. |
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.
CollectionCachein Penumbra maintains aMetaCacheand aResolvedFilesdictionary, representing the final, conflict-resolved state of all active file replacements for a collection.This includes the effective replacements from only the selected options of enabled mods, with all mod conflicts and priorities resolved.
This PR exposes this data via IPC by adding:
ResolvedFilesCollectionCache'sResolvedFileschange. (Passing which collection had the change, what mod changed it, the gamepath, old replacement path, and new replacement path)Current approaches used to obtain effective changes for an actor involve monitoring
GameObjectResourceResolved,GetGameObjectResourcePaths,ResolvePlayerPaths, andModSettingChanged. However this introduces complications when:.pcp-assigned objects)This new IPC will clear the ambiguity of the above, while providing benefits such as:
ResolvedFiles(including transient paths), even if not yet loaded by an any actors in the collection.ResolvedFilesupdates handle any changes from mod toggles, reloads, and priority changes for us.Additional IPC methods could be added in the future to expose grouped views of this data, such as:
Dictionary<string GamePath, (string ResolvedPath, string ModName)>Dictionary<string ModName, Dictionary<string GamePath, string ResolvedPath>>But I was not sure if you had any preference for how they should be formatted in the return call, so left it out for now.
However, including these would allow subscribers to group resolved files in a collection by mod, letting them know which
.avfxor.papsare related to a specific transient path.I have tested these changes locally and they fire when they should. Additionally the IPCTester behaves as expected.
Of note, the IPCTester will not track any changes you make in your mods tab due to the way the IPCTester subscribes and unsubscribes from methods. (This same issue occurs with the tester tracking the last called
ModSettingChangedevent)