-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update current sync methods and delegates #436
Update current sync methods and delegates #436
Conversation
- Updated lambda ordinals for `FloatMenuMakerMap` and `MechanitorUtility` delegates - Changed syncing of carry to shuttle lambda delegate to a local func - Removed syncing of `RoyalTitlePermitWorker_CallLaborers.CallLaborers`, as it's no longer needed since it'll be synced from `ITargetingSource.OrderForceTarget` - Added a sync worker for `RoyalTitlePermitWorker_CallLaborers`, as using that permit would otherwise desync - Added syncing of non-virtual `Verb.TryStartCastOn` method - It's required for ability syncing, as it can be called from `Ability.QueueCastingJob` (the `LocalTargetInfo` variant) if `verbProps.nonInterruptingSelfCast` is true - Modified `Targeter.BeginTargeting` patch to not handle `Verb.TryStartCastOn` calls - This is due to the previous change handling syncing of this specific case - Updated `SyncDelegates` and `SyncMethods` classes to use C# 12's collection expression - Added a sync worker for `IReloadableComp`, as it's needed by one of the `FloatMenuMakerMap` delegates - We could change it in the future to `Write/ReadWithImpl` - however, it seems there's a very limited amount of vanilla types implementing this interface
On a side note, do we need to sync all of those?: Multiplayer/Source/Client/Syncing/Game/SyncDelegates.cs Lines 18 to 31 in 2e1ed23
From my testing and digging into the code:
|
Also, as I've mentioned in #429, |
The |
FloatMenuMakerMap
andMechanitorUtility
delegatesRoyalTitlePermitWorker_CallLaborers.CallLaborers
, as it's no longer needed since it'll be synced fromITargetingSource.OrderForceTarget
RoyalTitlePermitWorker_CallLaborers
, as using that permit would otherwise desyncVerb.TryStartCastOn
methodAbility.QueueCastingJob
(theLocalTargetInfo
variant) ifverbProps.nonInterruptingSelfCast
is trueTargeter.BeginTargeting
patch to not handleVerb.TryStartCastOn
callsSyncDelegates
andSyncMethods
classes to use C# 12's collection expressionIReloadableComp
, as it's needed by one of theFloatMenuMakerMap
delegatesWrite/ReadWithImpl
- however, it seems there's a very limited amount of vanilla types implementing this interface