Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

OhmV-IR
Copy link
Contributor

@OhmV-IR OhmV-IR commented Dec 27, 2024

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.

Copy link
Collaborator

@Measurity Measurity left a 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.

NitroxPatcher/Patches/Dynamic/InfectionReveal_Patch.cs Outdated Show resolved Hide resolved
NitroxPatcher/Patches/Dynamic/InfectionReveal_Patch.cs Outdated Show resolved Hide resolved
@OhmV-IR OhmV-IR requested a review from Measurity December 27, 2024 15:38
@OhmV-IR
Copy link
Contributor Author

OhmV-IR commented Dec 29, 2024

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()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be made private

Copy link
Contributor Author

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

Copy link
Member

@Jannify Jannify Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NitroxPatcher/Patches/Dynamic/InfectionReveal_Patch.cs Outdated Show resolved Hide resolved
NitroxPatcher/Patches/Dynamic/InfectionReveal_Patch.cs Outdated Show resolved Hide resolved
NitroxPatcher/Patches/Dynamic/InfectionReveal_Patch.cs Outdated Show resolved Hide resolved
@OhmV-IR
Copy link
Contributor Author

OhmV-IR commented Dec 30, 2024

Tested in-game again, good for what will (hopefully) be the green round of reviews

@OhmV-IR OhmV-IR requested review from Measurity and Jannify December 30, 2024 18:25
@OhmV-IR OhmV-IR requested a review from Jannify December 31, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants