Remove usages of AnchoredChangedMessage.
It was a component message which is now deprecated.
This commit is contained in:
@@ -94,17 +94,6 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
UpdateAppearance();
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
AnchorUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region Connector port methods
|
||||
|
||||
public override void OnRemove()
|
||||
@@ -139,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
ConnectedPort = null;
|
||||
}
|
||||
|
||||
private void AnchorUpdate()
|
||||
public void AnchorUpdate()
|
||||
{
|
||||
if (Anchored)
|
||||
{
|
||||
|
||||
@@ -445,7 +445,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
_tag = tag;
|
||||
}
|
||||
|
||||
private void UpdateVisualState()
|
||||
public void UpdateVisualState()
|
||||
{
|
||||
UpdateVisualState(false);
|
||||
}
|
||||
@@ -620,10 +620,6 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
Remove(msg.Entity);
|
||||
break;
|
||||
|
||||
case AnchoredChangedMessage:
|
||||
UpdateVisualState();
|
||||
break;
|
||||
|
||||
case PowerChangedMessage powerChanged:
|
||||
PowerStateChanged(powerChanged);
|
||||
break;
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
appearance.SetData(DisposalTubeVisuals.VisualState, state);
|
||||
}
|
||||
|
||||
private void AnchoredChanged()
|
||||
public void AnchoredChanged()
|
||||
{
|
||||
if (!Owner.TryGetComponent(out PhysicsComponent? physics))
|
||||
{
|
||||
@@ -267,10 +267,6 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
_lastClang = _gameTiming.CurTime;
|
||||
SoundSystem.Play(Filter.Pvs(Owner), _clangSound, Owner.Transform.Coordinates);
|
||||
break;
|
||||
|
||||
case AnchoredChangedMessage:
|
||||
AnchoredChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateVisualState()
|
||||
public void UpdateVisualState()
|
||||
{
|
||||
UpdateVisualState(false);
|
||||
}
|
||||
@@ -547,10 +547,6 @@ namespace Content.Server.GameObjects.Components.Disposal
|
||||
Remove(msg.Entity);
|
||||
break;
|
||||
|
||||
case AnchoredChangedMessage:
|
||||
UpdateVisualState();
|
||||
break;
|
||||
|
||||
case PowerChangedMessage powerChanged:
|
||||
PowerStateChanged(powerChanged);
|
||||
break;
|
||||
|
||||
@@ -16,17 +16,6 @@ namespace Content.Server.GameObjects.Components.PA
|
||||
Owner.Transform.Anchored = true;
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
OnAnchorChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnAnchorChanged()
|
||||
{
|
||||
RescanIfPossible();
|
||||
|
||||
@@ -106,17 +106,6 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
||||
}
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
AnchorUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void ApcPowerChanged()
|
||||
{
|
||||
var oldPowered = Powered;
|
||||
@@ -211,7 +200,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
||||
}
|
||||
}
|
||||
|
||||
private void AnchorUpdate()
|
||||
public void AnchorUpdate()
|
||||
{
|
||||
if (Anchored)
|
||||
{
|
||||
|
||||
@@ -25,18 +25,7 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents
|
||||
|
||||
[ComponentDependency] private readonly PhysicsComponent? _collidableComponent = default!;
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
OnAnchoredChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAnchoredChanged()
|
||||
public void OnAnchoredChanged()
|
||||
{
|
||||
if(_collidableComponent != null && _collidableComponent.BodyType == BodyType.Static)
|
||||
Owner.SnapToGrid();
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Linq;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.Physics;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
@@ -70,18 +69,7 @@ namespace Content.Server.GameObjects.Components.Singularity
|
||||
public bool CanRepell(IEntity toRepell) => _connection1?.Item2?.CanRepell(toRepell) == true ||
|
||||
_connection2?.Item2?.CanRepell(toRepell) == true;
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
switch (message)
|
||||
{
|
||||
case AnchoredChangedMessage:
|
||||
OnAnchoredChanged();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAnchoredChanged()
|
||||
public void OnAnchoredChanged()
|
||||
{
|
||||
if(_collidableComponent?.BodyType != BodyType.Static)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user