* 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>
36 lines
943 B
C#
36 lines
943 B
C#
using Content.Server.Chat.Systems;
|
|
using Content.Shared.Magic;
|
|
using Content.Shared.Magic.Events;
|
|
|
|
namespace Content.Server.Magic;
|
|
|
|
public sealed class MagicSystem : SharedMagicSystem
|
|
{
|
|
[Dependency] private readonly ChatSystem _chat = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SpeakSpellEvent>(OnSpellSpoken);
|
|
}
|
|
|
|
private void OnSpellSpoken(ref SpeakSpellEvent args)
|
|
{
|
|
_chat.TrySendInGameICMessage(args.Performer, Loc.GetString(args.Speech), InGameICChatType.Speak, false);
|
|
}
|
|
|
|
public override void OnVoidApplause(VoidApplauseSpellEvent ev)
|
|
{
|
|
base.OnVoidApplause(ev);
|
|
|
|
_chat.TryEmoteWithChat(ev.Performer, ev.Emote);
|
|
|
|
var perfXForm = Transform(ev.Performer);
|
|
var targetXForm = Transform(ev.Target);
|
|
|
|
Spawn(ev.Effect, perfXForm.Coordinates);
|
|
Spawn(ev.Effect, targetXForm.Coordinates);
|
|
}
|
|
}
|