Fix void monolith float menu causing desync with CompProximityLetter
#499
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.
CompProximityLetter
(void monolith, ancient mechanitor exostrider) sends a letter when a player pawn gets close to it. This is disabled (CompProximityLetter.letterSent
is set to true) when the void monolith is automatically activated, or when a pawn is ordered to interact with it.When a pawn interacts with the monolith by using the gizmo, the method disabling the letter is synced. However, when using float menu to do it the letter is only disabled for the player who ordered it, as the method is not synced (instead, the interaction is synced by
Pawn_JobTracker.TryTakeOrderedJob
call). It then displays the letter for everyone besides the player who ordered the interaction, causing desync (new ID assigned, causing desync trace mismatch).The fix was rather simple and required syncing the method the float menu calls when clicked. Investigating what caused the desync took much longer.
I've also moved the void monolith sync methods from
SyncMethods
file toSyncDelegates
to keep them categorized, specifically by keeping them together with the newly added sync delegate.