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

@@ -22,10 +22,10 @@ namespace Content.Shared.GameObjects.EntitySystems.Atmos
public GameTick LastUpdate { get; private set; }
public GasOverlayChunk(GridId gridIndices, Vector2i Vector2i)
public GasOverlayChunk(GridId gridIndices, Vector2i vector2i)
{
GridIndices = gridIndices;
Vector2i = Vector2i;
Vector2i = vector2i;
}
public void Dirty(GameTick currentTick)

View File

@@ -52,9 +52,9 @@ namespace Content.Shared.GameObjects.EntitySystems
base.Shutdown();
}
protected void UpdateKinematics(ITransformComponent transform, IMoverComponent mover, ICollidableComponent collidable)
protected void UpdateKinematics(ITransformComponent transform, IMoverComponent mover, IPhysicsComponent physics)
{
collidable.EnsureController<MoverController>();
physics.EnsureController<MoverController>();
var weightless = !transform.Owner.HasComponent<MovementIgnoreGravityComponent>() &&
_physicsManager.IsWeightless(transform.Coordinates);
@@ -62,7 +62,7 @@ namespace Content.Shared.GameObjects.EntitySystems
if (weightless)
{
// No gravity: is our entity touching anything?
var touching = IsAroundCollider(transform, mover, collidable);
var touching = IsAroundCollider(transform, mover, physics);
if (!touching)
{
@@ -75,7 +75,7 @@ namespace Content.Shared.GameObjects.EntitySystems
var combined = walkDir + sprintDir;
if (combined.LengthSquared < 0.001 || !ActionBlockerSystem.CanMove(mover.Owner) && !weightless)
{
if (collidable.TryGetController(out MoverController controller))
if (physics.TryGetController(out MoverController controller))
{
controller.StopMoving();
}
@@ -84,7 +84,7 @@ namespace Content.Shared.GameObjects.EntitySystems
{
if (weightless)
{
if (collidable.TryGetController(out MoverController controller))
if (physics.TryGetController(out MoverController controller))
{
controller.Push(combined, mover.CurrentPushSpeed);
}
@@ -96,7 +96,7 @@ namespace Content.Shared.GameObjects.EntitySystems
var total = walkDir * mover.CurrentWalkSpeed + sprintDir * mover.CurrentSprintSpeed;
{
if (collidable.TryGetController(out MoverController controller))
if (physics.TryGetController(out MoverController controller))
{
controller.Move(total, 1);
}
@@ -114,7 +114,7 @@ namespace Content.Shared.GameObjects.EntitySystems
}
private bool IsAroundCollider(ITransformComponent transform, IMoverComponent mover,
ICollidableComponent collider)
IPhysicsComponent collider)
{
foreach (var entity in _entityManager.GetEntitiesInRange(transform.Owner, mover.GrabRange, true))
{
@@ -123,7 +123,7 @@ namespace Content.Shared.GameObjects.EntitySystems
continue; // Don't try to push off of yourself!
}
if (!entity.TryGetComponent<ICollidableComponent>(out var otherCollider))
if (!entity.TryGetComponent<IPhysicsComponent>(out var otherCollider))
{
continue;
}