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

@@ -254,9 +254,9 @@ namespace Content.Server.GameObjects.Components.Doors
airtight.AirBlocked = false;
}
if (Owner.TryGetComponent(out ICollidableComponent? collidable))
if (Owner.TryGetComponent(out IPhysicsComponent? physics))
{
collidable.Hard = false;
physics.Hard = false;
}
await Timer.Delay(OpenTimeTwo, _cancellationTokenSource.Token);
@@ -297,7 +297,7 @@ namespace Content.Server.GameObjects.Components.Doors
private void CheckCrush()
{
if (!Owner.TryGetComponent(out ICollidableComponent? body))
if (!Owner.TryGetComponent(out IPhysicsComponent? body))
return;
// Crush
@@ -305,7 +305,7 @@ namespace Content.Server.GameObjects.Components.Doors
{
if (!e.TryGetComponent(out StunnableComponent? stun)
|| !e.TryGetComponent(out IDamageableComponent? damage)
|| !e.TryGetComponent(out ICollidableComponent? otherBody))
|| !e.TryGetComponent(out IPhysicsComponent? otherBody))
continue;
var percentage = otherBody.WorldAABB.IntersectPercentage(body.WorldAABB);
@@ -377,7 +377,8 @@ namespace Content.Server.GameObjects.Components.Doors
{
bool shouldCheckCrush = false;
if (_canCrush && Owner.TryGetComponent(out ICollidableComponent? collidable) && collidable.IsColliding(Vector2.Zero, false))
if (_canCrush && Owner.TryGetComponent(out IPhysicsComponent? physics) &&
physics.IsColliding(Vector2.Zero, false))
{
if (Safety)
return false;
@@ -406,7 +407,7 @@ namespace Content.Server.GameObjects.Components.Doors
airtight.AirBlocked = true;
}
if (Owner.TryGetComponent(out ICollidableComponent? body))
if (Owner.TryGetComponent(out IPhysicsComponent? body))
{
body.Hard = true;
}