Updates the Content EntitySystems with the changes to the event API.

Visual Studio wants to update the version of the solution, and change some GUIDs around.
This commit is contained in:
Acruid
2020-02-18 19:43:54 -08:00
parent ffd06df700
commit c51533686b
10 changed files with 199 additions and 277 deletions

View File

@@ -5,7 +5,6 @@ using JetBrains.Annotations;
using Robust.Client.Interfaces.GameObjects.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
@@ -24,30 +23,10 @@ namespace Content.Client.GameObjects.EntitySystems
public override void Initialize()
{
base.Initialize();
SubscribeEvent<PlayMeleeWeaponAnimationMessage>(PlayWeaponArc);
EntityQuery = new TypeEntityQuery(typeof(MeleeWeaponArcAnimationComponent));
}
public override void RegisterMessageTypes()
{
base.RegisterMessageTypes();
RegisterMessageType<PlayMeleeWeaponAnimationMessage>();
}
public override void HandleNetMessage(INetChannel channel, EntitySystemMessage message)
{
base.HandleNetMessage(channel, message);
switch (message)
{
case PlayMeleeWeaponAnimationMessage playMsg:
PlayWeaponArc(playMsg);
break;
}
}
public override void FrameUpdate(float frameTime)
{
base.FrameUpdate(frameTime);
@@ -58,7 +37,7 @@ namespace Content.Client.GameObjects.EntitySystems
}
}
private void PlayWeaponArc(PlayMeleeWeaponAnimationMessage msg)
private void PlayWeaponArc(object sender, PlayMeleeWeaponAnimationMessage msg)
{
if (!_prototypeManager.TryIndex(msg.ArcPrototype, out MeleeWeaponAnimationPrototype weaponArc))
{