Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
893b81d
Add missing animations
BobbyTheCatfish Feb 22, 2026
b962ff7
remove duplicate animations
BobbyTheCatfish Mar 8, 2026
b21b1a2
prevent duplicate damageHero components
BobbyTheCatfish Mar 8, 2026
5b5d95d
Finalize basic bind start and end animations
BobbyTheCatfish Mar 8, 2026
1f6ec4b
Util to prevent recycling
BobbyTheCatfish Mar 8, 2026
fdce032
Temporary testing component for bind animation
BobbyTheCatfish Mar 8, 2026
3a42c82
add shaman bind
BobbyTheCatfish Mar 8, 2026
1fd5ce7
Finalize claw mirrors and shamans
BobbyTheCatfish Mar 9, 2026
f20f9ce
Add cursed crest
BobbyTheCatfish Mar 9, 2026
5edff7f
Create method to intercept FSM states
BobbyTheCatfish Mar 10, 2026
e2201b2
Add system for sub-effects
BobbyTheCatfish Mar 10, 2026
ea6de8b
Finalize witch crest
BobbyTheCatfish Mar 10, 2026
2567a37
Accidentally committed log removals
BobbyTheCatfish Mar 10, 2026
b335f55
Fix architect charged downspike
BobbyTheCatfish Mar 10, 2026
0bb6f5c
use static instance of bindburst
BobbyTheCatfish Mar 10, 2026
3c8e537
finish shaman, fix maggot effect
BobbyTheCatfish Mar 10, 2026
902bc1d
clean up, add docs
BobbyTheCatfish Mar 10, 2026
d80d43b
add bind fail effect plus exploding warding bell
BobbyTheCatfish Mar 10, 2026
ce83546
add more sounds
BobbyTheCatfish Mar 11, 2026
10f6a13
fix shaman crest double silk sounds
BobbyTheCatfish Mar 11, 2026
e288207
rename bind fail, prevent fsm injection errors from interupting flow
BobbyTheCatfish Mar 14, 2026
f4f0c48
Merge remote-tracking branch 'upstream/main' into more-animations
BobbyTheCatfish Mar 14, 2026
b21f4c1
Catch errors to fully prevent fsm breaks
BobbyTheCatfish Mar 15, 2026
c56568e
Add documentation
BobbyTheCatfish Mar 15, 2026
32a885f
remove testing components
BobbyTheCatfish Mar 15, 2026
9d9f434
documentation, remove accidental debugs
BobbyTheCatfish Mar 18, 2026
37b4038
requested style changes
BobbyTheCatfish Mar 18, 2026
ec01d3c
remove player id from animations, use object instance id instead
BobbyTheCatfish Mar 18, 2026
a9418d9
fix typos and more style changes
BobbyTheCatfish Mar 18, 2026
3c1c655
missed a component destroy
BobbyTheCatfish Mar 18, 2026
acd47b3
i'm bad at splelling apparently
BobbyTheCatfish Mar 18, 2026
868cdeb
remove redundant checks, use vars for more strings
BobbyTheCatfish Mar 19, 2026
97dddc7
add util to remove child gameobjects
BobbyTheCatfish Mar 19, 2026
5726cbd
Final cleanup
Extremelyd1 Apr 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
372 changes: 358 additions & 14 deletions SSMP/Animation/AnimationClip.cs

Large diffs are not rendered by default.

458 changes: 441 additions & 17 deletions SSMP/Animation/AnimationManager.cs

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions SSMP/Animation/DamageAnimationEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,41 @@ public void SetShouldDoDamage(bool shouldDoDamage) {
/// </summary>
/// <param name="target">The target game object to attach the component to.</param>
/// <param name="damage">The number of mask of damage it should deal.</param>
protected static void AddDamageHeroComponent(GameObject target, int damage = 1) {
var damageHero = target.AddComponent<DamageHero>();
/// <returns>The <see cref="DamageHero"/> component that was added to the game object</returns>
protected static DamageHero AddDamageHeroComponent(GameObject target, int damage = 1) {
var damageHero = target.AddComponentIfNotPresent<DamageHero>();
damageHero.damageDealt = damage;
damageHero.OnDamagedHero = new UnityEvent();

return damageHero;
}

/// <summary>
/// Removes a <see cref="DamageHero"/> component from the given game object.
/// </summary>
/// <param name="target">The target game object to detach the component from.</param>
protected static void RemoveDamageHeroComponent(GameObject target) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Just checking, this should stay protected, because we might use it in a class that inherits from this right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct. I can't really think of anything besides cogflies/flames that might use something like this, but the possibility is there.

var damageHero = target.GetComponent<DamageHero>();
if (damageHero == null) {
return;
}

Object.DestroyImmediate(damageHero);
}

/// <summary>
/// Adds or removes a <see cref="DamageHero"/> component from the given game object,
/// depending on the PVP and team settings.
/// </summary>
/// <param name="target">The target game object to detatch the component to.</param>
/// <param name="damage">The number of mask of damage it should deal.</param>
/// <returns>The <see cref="DamageHero"/> component that was added if PVP was turned on</returns>
protected DamageHero? SetDamageHeroState(GameObject target, int damage = 1) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are you planning on using the return value from this method? Currently it is not used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Possibly, at least in other effects. Mostly I wanted to make it consistent with AddDamageHeroComponent.

if (ServerSettings.IsPvpEnabled && ShouldDoDamage) {
return AddDamageHeroComponent(target, damage);
}

RemoveDamageHeroComponent(target);
return null;
}
}
Loading