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.
A recent update added a main tab for multi-floor map schedules to allow/disallow pawns from automatically going to specific floors at specific times of the day. There were also a couple of other features, but looks like this is the only one that needed syncing.
Because MP right now can't handle syncing pocket map world objects (fixed by rwmt/Multiplayer#504), a new sync worker for it needed to be added. However, since
PocketMapParent
would be synced implicitly byWorldObject
sync worker, we need to skip theHasSyncWorker
check as it would return true and gives us a warning.I've added a
HashSet<Type>
that holds all types that were passed to this method, skipping execution if it already contained it. This ensures that sync workers skippingHasSyncWorker
check will only be registered once at most, as well as preventing warnings that "sync worker exists in MP" if we attempt to register the same one 2 or more times. This will also ensure that warning due to MP having the sync worker and errors due to unsupported types will at most be displayed once per type.