Replaces AnchoredChanged C# event with ComponentMessage (#2905)
* Replaces AnchoredChanged C# event with ComponentMessage * Removes unneeded fields Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Timing;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
@@ -36,7 +37,17 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents
|
||||
Logger.Error("RadiationCollectorComponent created with no CollidableComponent");
|
||||
return;
|
||||
}
|
||||
_collidableComponent.AnchoredChanged += OnAnchoredChanged;
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
OnAnchoredChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAnchoredChanged()
|
||||
|
||||
Reference in New Issue
Block a user