Remove compiler warnings.

This commit is contained in:
Pieter-Jan Briers
2018-07-26 23:55:34 +02:00
parent b34591ab59
commit cb439ba39a
2 changed files with 17 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ using SS14.Shared.Maths;
using SS14.Shared.IoC; using SS14.Shared.IoC;
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using SS14.Shared.Serialization; using SS14.Shared.Serialization;
using SS14.Shared.Interfaces.Network;
namespace Content.Server.GameObjects namespace Content.Server.GameObjects
{ {
@@ -39,15 +40,15 @@ namespace Content.Server.GameObjects
base.Initialize(); base.Initialize();
collidableComponent = Owner.GetComponent<CollidableComponent>(); collidableComponent = Owner.GetComponent<CollidableComponent>();
collidableComponent.OnBump += OnBump;
spriteComponent = Owner.GetComponent<SpriteComponent>(); spriteComponent = Owner.GetComponent<SpriteComponent>();
} }
public override void OnRemove() public override void OnRemove()
{ {
collidableComponent.OnBump -= OnBump;
collidableComponent = null; collidableComponent = null;
spriteComponent = null; spriteComponent = null;
base.OnRemove();
} }
public bool Attackhand(IEntity user) public bool Attackhand(IEntity user)
@@ -63,15 +64,21 @@ namespace Content.Server.GameObjects
return true; return true;
} }
private void OnBump(object sender, BumpEventArgs args) public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
{ {
Logger.Info("Bump!"); base.HandleMessage(message, netChannel, component);
if (Opened)
{
return;
}
Open(); switch (message)
{
case BumpedEntMsg msg:
if (Opened)
{
return;
}
Open();
break;
}
} }
public void Open() public void Open()

2
engine

Submodule engine updated: bceda76bf8...696bf486a6