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:
@@ -39,9 +39,9 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
airtightComponent.AirBlocked = false;
|
||||
}
|
||||
|
||||
if (Owner.TryGetComponent(out ICollidableComponent collidableComponent))
|
||||
if (Owner.TryGetComponent(out IPhysicsComponent physics))
|
||||
{
|
||||
collidableComponent.Hard = false;
|
||||
physics.Hard = false;
|
||||
}
|
||||
|
||||
AutoClose = false;
|
||||
|
||||
@@ -142,10 +142,10 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
}
|
||||
|
||||
var entity = _entityManager.GetEntity(uid);
|
||||
var collidable = Owner.GetComponent<ICollidableComponent>();
|
||||
var otherCollidable = entity.GetComponent<ICollidableComponent>();
|
||||
var physics = Owner.GetComponent<IPhysicsComponent>();
|
||||
var otherPhysics = entity.GetComponent<IPhysicsComponent>();
|
||||
|
||||
if (!collidable.WorldAABB.Intersects(otherCollidable.WorldAABB))
|
||||
if (!physics.WorldAABB.Intersects(otherPhysics.WorldAABB))
|
||||
{
|
||||
_collided.Remove(uid);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
public GasMixture Air { get; set; }
|
||||
|
||||
[ViewVariables]
|
||||
public bool Anchored => !Owner.TryGetComponent<ICollidableComponent>(out var collidable) || collidable.Anchored;
|
||||
public bool Anchored => !Owner.TryGetComponent<IPhysicsComponent>(out var physics) || physics.Anchored;
|
||||
|
||||
[ViewVariables]
|
||||
public GasCanisterPortComponent ConnectedPort { get; private set; }
|
||||
@@ -39,19 +39,19 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
if (Owner.TryGetComponent<ICollidableComponent>(out var collidable))
|
||||
if (Owner.TryGetComponent<IPhysicsComponent>(out var physics))
|
||||
{
|
||||
AnchorUpdate();
|
||||
collidable.AnchoredChanged += AnchorUpdate;
|
||||
physics.AnchoredChanged += AnchorUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRemove()
|
||||
{
|
||||
base.OnRemove();
|
||||
if (Owner.TryGetComponent<ICollidableComponent>(out var collidable))
|
||||
if (Owner.TryGetComponent<IPhysicsComponent>(out var physics))
|
||||
{
|
||||
collidable.AnchoredChanged -= AnchorUpdate;
|
||||
physics.AnchoredChanged -= AnchorUpdate;
|
||||
}
|
||||
DisconnectFromPort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user