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:
@@ -50,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
||||
/// </summary>
|
||||
public bool Connectable => Anchored;
|
||||
|
||||
private bool Anchored => !Owner.TryGetComponent<ICollidableComponent>(out var collidable) || collidable.Anchored;
|
||||
private bool Anchored => !Owner.TryGetComponent<IPhysicsComponent>(out var physics) || physics.Anchored;
|
||||
|
||||
[ViewVariables]
|
||||
public bool NeedsProvider { get; private set; } = true;
|
||||
@@ -92,18 +92,18 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
||||
{
|
||||
TryFindAndSetProvider();
|
||||
}
|
||||
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()
|
||||
{
|
||||
if (Owner.TryGetComponent<ICollidableComponent>(out var collidable))
|
||||
if (Owner.TryGetComponent<IPhysicsComponent>(out var physics))
|
||||
{
|
||||
collidable.AnchoredChanged -= AnchorUpdate;
|
||||
physics.AnchoredChanged -= AnchorUpdate;
|
||||
}
|
||||
_provider.RemoveReceiver(this);
|
||||
base.OnRemove();
|
||||
|
||||
Reference in New Issue
Block a user