-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sync infection anim #2213
base: master
Are you sure you want to change the base?
Sync infection anim #2213
Conversation
…sting AnimationChangeEvent processor(added new enum value)
…is untested as of now
…routine to automatically time sending the end infection sync animation packet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ on the feature.
Nitrox.Test/Patcher/Patches/Dynamic/InfectionReveal_PatchTest.cs
Outdated
Show resolved
Hide resolved
…ck, saves some lines Co-authored-by: Measurity <[email protected]>
Co-authored-by: Measurity <[email protected]>
…erTest class to implement new testing method in this PR
…m running twice on remote clients
tested in game, both through infectionreveal command and through normal story triggers, both seem to work(tested with 2 clients), just need a final code review from @Measurity and then good to merge |
|
||
public sealed partial class InfectionReveal_Patch : NitroxPatch, IDynamicPatch | ||
{ | ||
internal static readonly MethodInfo TARGET_METHOD = AccessTools.EnumeratorMoveNext(Reflect.Method((Player t) => t.TriggerInfectionRevealAsync())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be made private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made internal since it can't be made private due to being defined in a namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You sure? How can https://github.com/SubnauticaNitrox/Nitrox/blob/master/NitroxPatcher/Patches/Dynamic/BreakableResource_BreakIntoResources_Patch.cs then have it private.
Co-authored-by: Jannify <[email protected]>
Co-authored-by: Jannify <[email protected]>
Co-authored-by: Jannify <[email protected]>
…oxModdedUnofficial into sync-infection-anim
Co-authored-by: Jannify <[email protected]>
Tested in-game again, good for what will (hopefully) be the green round of reviews |
Does what the title says. The story goals are already synced through StoryGoalExecuted packets and processors, but the animation wasn't. Uses a transpiler to trigger sending the AnimChangeEvent packet to start the animation and then just uses a coroutine to time the ending animation packet with the fixed duration of the animation(12 seconds). Ready for reviews code-wise at this time and should theoretically work, builds and seems to run fine but haven't been able to test properly yet.