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

@@ -43,8 +43,8 @@ namespace Content.Server.GameObjects.Components.Disposal
[ViewVariables]
private bool Anchored =>
!Owner.TryGetComponent(out CollidableComponent? collidable) ||
collidable.Anchored;
!Owner.TryGetComponent(out PhysicsComponent? physics) ||
physics.Anchored;
/// <summary>
/// The directions that this tube can connect to others from
@@ -192,12 +192,12 @@ namespace Content.Server.GameObjects.Components.Disposal
private void AnchoredChanged()
{
if (!Owner.TryGetComponent(out CollidableComponent? collidable))
if (!Owner.TryGetComponent(out PhysicsComponent? physics))
{
return;
}
if (collidable.Anchored)
if (physics.Anchored)
{
OnAnchor();
}
@@ -232,16 +232,16 @@ namespace Content.Server.GameObjects.Components.Disposal
Contents = ContainerManagerComponent.Ensure<Container>(Name, Owner);
Owner.EnsureComponent<AnchorableComponent>();
var collidable = Owner.EnsureComponent<CollidableComponent>();
var physics = Owner.EnsureComponent<PhysicsComponent>();
collidable.AnchoredChanged += AnchoredChanged;
physics.AnchoredChanged += AnchoredChanged;
}
protected override void Startup()
{
base.Startup();
if (!Owner.EnsureComponent<CollidableComponent>().Anchored)
if (!Owner.EnsureComponent<PhysicsComponent>().Anchored)
{
return;
}
@@ -254,8 +254,8 @@ namespace Content.Server.GameObjects.Components.Disposal
{
base.OnRemove();
var collidable = Owner.EnsureComponent<CollidableComponent>();
collidable.AnchoredChanged -= AnchoredChanged;
var physics = Owner.EnsureComponent<PhysicsComponent>();
physics.AnchoredChanged -= AnchoredChanged;
Disconnect();
}