Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync rename dialogs (sync IRenameable.RenamableLabel setter) (#443)
* Sync rename dialogs (sync IRenameable.RenamableLabel setter) Synced all implementations of `IRenameable.RenamableLabel` setter for types that can be synced. I've decided to only apply the sync worker for types that can be synced for safety, as the rename dialogs are of low enough importance that encountering errors or other issues because of them would not be desirable. After all, if rename dialog is not synced then it should not cause any issues besides a minor visual desync (unless there's a mod that does something special with the name, which I've not really encountered). I've wrapped the portion of the code registering it in a double call to `LongEventHandler.ExecuteWhenFinished` to ensure it runs after MP Compat's late patches, ensuring all Sync Workers will be registered by it at this point. Because of no logging when there's `IRenameable` that can't be synced, I've included a debug action which will list all types implementing `IRenameable.RenamableLabel` setter, separated into synced and unsynced ones. This will allow us to easily check if we need to create a sync worker for any of the `IRenameable` implementations. * Synced Dialog_RenameBuildingStorage_CreateNew:OnRenamed `Dialog_RenameBuildingStorage_CreateNew:OnRenamed` creates a storage group, which requires syncing on top of renaming. No other vanilla dialog needs syncing dialogs like those, but some mods may require it as well.
- Loading branch information