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

@@ -41,7 +41,7 @@ namespace Content.Server.Throw
/// </param>
public static void Throw(IEntity thrownEnt, float throwForce, EntityCoordinates targetLoc, EntityCoordinates sourceLoc, bool spread = false, IEntity throwSourceEnt = null)
{
if (!thrownEnt.TryGetComponent(out ICollidableComponent colComp))
if (!thrownEnt.TryGetComponent(out IPhysicsComponent colComp))
return;
var entityManager = IoCManager.Resolve<IEntityManager>();
@@ -84,7 +84,7 @@ namespace Content.Server.Throw
projComp.StartThrow(angle.ToVec(), spd);
if (throwSourceEnt != null &&
throwSourceEnt.TryGetComponent<ICollidableComponent>(out var physics) &&
throwSourceEnt.TryGetComponent<IPhysicsComponent>(out var physics) &&
physics.TryGetController(out MoverController mover))
{
var physicsMgr = IoCManager.Resolve<IPhysicsManager>();
@@ -139,9 +139,9 @@ namespace Content.Server.Throw
var throwDuration = ThrownItemComponent.DefaultThrowTime;
var mass = 1f;
if (thrownEnt.TryGetComponent(out ICollidableComponent collidable))
if (thrownEnt.TryGetComponent(out IPhysicsComponent physics))
{
mass = collidable.Mass;
mass = physics.Mass;
}
var velocityNecessary = distance / throwDuration;