Rename usages of collidable to physics (#2230)

* Rename usages of collidable to physics

* high tier PANIQUE

* aaaaaaaaAAAAAa

* cursed commit dont research

* Fix urist and items being anchored

* Fix the rest
This commit is contained in:
DrSmugleaf
2020-10-11 16:36:58 +02:00
committed by GitHub
parent 413ca9812d
commit b64cb24059
79 changed files with 292 additions and 268 deletions

View File

@@ -39,7 +39,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
/// </summary>
private bool Connectable => !_deleting && Anchored;
private bool Anchored => !Owner.TryGetComponent<ICollidableComponent>(out var collidable) || collidable.Anchored;
private bool Anchored => !Owner.TryGetComponent<IPhysicsComponent>(out var physics) || physics.Anchored;
/// <summary>
/// Prevents a node from being used by other nodes while midway through removal.
@@ -63,19 +63,19 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
{
TryAssignGroupIfNeeded();
CombineGroupWithReachable();
if (Owner.TryGetComponent<ICollidableComponent>(out var collidable))
if (Owner.TryGetComponent<IPhysicsComponent>(out var physics))
{
AnchorUpdate();
collidable.AnchoredChanged += AnchorUpdate;
physics.AnchoredChanged += AnchorUpdate;
}
}
public void OnContainerRemove()
{
_deleting = true;
if (Owner.TryGetComponent<ICollidableComponent>(out var collidable))
if (Owner.TryGetComponent<IPhysicsComponent>(out var physics))
{
collidable.AnchoredChanged -= AnchorUpdate;
physics.AnchoredChanged -= AnchorUpdate;
}
NodeGroup.RemoveNode(this);
}