Conversation
Extremelyd1
left a comment
There was a problem hiding this comment.
Thanks so much for the PR, this was very much needed!
I've left a bunch of comments, which I've tried to add suggestions to so you can easily resolve them.
Let me start out by saying that you should try to use the .editorconfig file in the root of the project. Most IDEs have support for this file. The editor config defines the formatting style throughout the project and ensures that we are all on the same page about what style to use. In Rider for example (and I assume this is the same in VS), the IDE will generate warnings for inconsistent code styling and allow you to easily fix it or run a formatter to fix it automatically.
I don't have many comments about desing choices, as I feel that with the implementation of animations, it will almost always be somewhat janky to implement. I've not left any comments regarding code comments, as you mentioned in the PR that you still needed to do those.
I look forward to the remaining changes!
SSMP/Animation/Effects/Bind.cs
Outdated
| public bool BaseMirror = false; | ||
| public bool UpgradedMirror = false; | ||
| public bool QuickBind = false; | ||
| public bool ReserveBind = false; |
There was a problem hiding this comment.
As said in your PR description, this is not yet checked.
|
|
||
| internal class FsmStateActionInjector : FsmStateAction { | ||
| private static Action? _onUninject; | ||
| private Action<PlayMakerFSM>? _onStateEnter; |
There was a problem hiding this comment.
This field can be made readonly:
| private Action<PlayMakerFSM>? _onStateEnter; | |
| private readonly Action<PlayMakerFSM>? _onStateEnter; |
There was a problem hiding this comment.
I decided to remove the action when uninjecting, just to be safe, so it is written to now.
SSMP/Animation/Effects/Bind.cs
Outdated
| /// </summary> | ||
| private void PlayNormalStart(GameObject bindEffects, Flags flags) { | ||
| Logger.Debug("Playing normal bind start animation"); | ||
| var bindSilkObj = CreateEffectIfNotExists(bindEffects, "Bind Silk"); |
There was a problem hiding this comment.
Could we perhaps switch to strongly typed variables? Perhaps an Enum or even const variables?
There was a problem hiding this comment.
I added a bunch of const variables for the effect object names since enums can't do strings. lmk how it looks.
|
Hi, i liked your work with the Animations (kudos to you) and i wanted to point some things i saw! I left some comments (some are off by 1-2 lines but you will get the reference) on some things that could be improved. Apart from them, things like extracting some functions and crafting some re-usable components or making some small changes like changing function accessibility modifiers would be welcome! |
|
What is the current status of this? It is still marked as draft and you haven't re-requested a review. |
|
I could re-request if you want, I was just waiting on some responses to some of the open comments that I replied to |
|
Alright, that's fine. For future reference, it is best if you respond to all the comments I left and make the necessary changes and once you are done request another review. That way, I know you are done with everything and I can take a look again! |
Adds a bunch of less-common missing animations, but the main attraction are the new bind effects.
Global:
Beast Crest:
Witch Crest:
Shaman Crest:
Cursed Crest:
Notable changes
FSM Action Injection (Hooking)
This will likely be the groundwork for tool sync, so I want to get this right. It works by inserting an
FSM State Actioninto a given state and index. Once the FSM reaches thisFSM State Action, aSystem Actionwill be invoked, running a function. Right now this is used to send an animation packet over the network.SubAnimationEffects
Located in
AnimationManager, this functions similarly toAnimationEffects. The only difference is that the normal animator doesn't send them to theplayerObjectanimator, and instead only runs the effect animation.Player IDs in Effects
It's a pretty small change, but accounts for a decent amount of changed files. I needed the player ID to manage the maggot explosions, so the IDs had to be added to all of the effects.
Todo
I just remembered that I still need to check quick bind and use the reserve bind flag, but this is still ready for review