Void's Applause (#34591)

* Adds single clap emote

* Adds missing single clap loc

* Adds void blink effects, sound, and sprite

* Adds VoidApplauseEvent and implements it into the Magic System and Grimoire

* Removes commented Spawn code in Shared Magic System. Adds comments to replace pointlight with a negative light in the future.

* Makes spells Mono

* Changes to swap positions.

* Makes Void Applause target body only

* Update Content.Shared/Magic/Events/VoidApplauseSpellEvent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Client/Magic/MagicSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Audio/Effects/Emotes/attributions.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/SoundCollections/emotes.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Magic/Events/VoidApplauseSpellEvent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Removes duplicate effect spawning from server

* Puts Void Applause effect on server, lets lizards hear clap

* Adds single clap to diona

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
keronshb
2025-01-30 19:10:35 -05:00
committed by GitHub
parent abcd68273b
commit 6565ba52b2
18 changed files with 189 additions and 4 deletions

View File

@@ -80,6 +80,7 @@ public abstract class SharedMagicSystem : EntitySystem
SubscribeLocalEvent<ChargeSpellEvent>(OnChargeSpell);
SubscribeLocalEvent<RandomGlobalSpawnSpellEvent>(OnRandomGlobalSpawnSpell);
SubscribeLocalEvent<MindSwapSpellEvent>(OnMindSwapSpell);
SubscribeLocalEvent<VoidApplauseSpellEvent>(OnVoidApplause);
// Spell wishlist
// A wishlish of spells that I'd like to implement or planning on implementing in a future PR
@@ -402,8 +403,7 @@ public abstract class SharedMagicSystem : EntitySystem
return;
var transform = Transform(args.Performer);
if (transform.MapID != args.Target.GetMapId(EntityManager) || !_interaction.InRangeUnobstructed(args.Performer, args.Target, range: 1000F, collisionMask: CollisionGroup.Opaque, popup: true))
if (transform.MapID != _transform.GetMapId(args.Target) || !_interaction.InRangeUnobstructed(args.Performer, args.Target, range: 1000F, collisionMask: CollisionGroup.Opaque, popup: true))
return;
_transform.SetCoordinates(args.Performer, args.Target);
@@ -411,6 +411,17 @@ public abstract class SharedMagicSystem : EntitySystem
Speak(args);
args.Handled = true;
}
public virtual void OnVoidApplause(VoidApplauseSpellEvent ev)
{
if (ev.Handled || !PassesSpellPrerequisites(ev.Action, ev.Performer))
return;
ev.Handled = true;
Speak(ev);
_transform.SwapPositions(ev.Performer, ev.Target);
}
// End Teleport Spells
#endregion
#region Spell Helpers