Use Uid for standingstate methods (#4856)
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Shared.MobState.State
|
||||
{
|
||||
base.ExitState(entity);
|
||||
|
||||
EntitySystem.Get<StandingStateSystem>().Stand(entity);
|
||||
EntitySystem.Get<StandingStateSystem>().Stand(entity.Uid);
|
||||
}
|
||||
|
||||
public override bool CanInteract()
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace Content.Shared.MobState.State
|
||||
var wake = entity.EnsureComponent<CollisionWakeComponent>();
|
||||
wake.Enabled = true;
|
||||
var standingState = EntitySystem.Get<StandingStateSystem>();
|
||||
standingState.Down(entity);
|
||||
standingState.Down(entity.Uid);
|
||||
|
||||
if (standingState.IsDown(entity) && entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
if (standingState.IsDown(entity.Uid) && entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
{
|
||||
physics.CanCollide = false;
|
||||
}
|
||||
@@ -36,9 +36,9 @@ namespace Content.Shared.MobState.State
|
||||
}
|
||||
|
||||
var standingState = EntitySystem.Get<StandingStateSystem>();
|
||||
standingState.Stand(entity);
|
||||
standingState.Stand(entity.Uid);
|
||||
|
||||
if (!standingState.IsDown(entity) && entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
if (!standingState.IsDown(entity.Uid) && entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
{
|
||||
physics.CanCollide = true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Content.Shared.MobState.State
|
||||
public override void EnterState(IEntity entity)
|
||||
{
|
||||
base.EnterState(entity);
|
||||
EntitySystem.Get<StandingStateSystem>().Stand(entity);
|
||||
EntitySystem.Get<StandingStateSystem>().Stand(entity.Uid);
|
||||
|
||||
if (entity.TryGetComponent(out SharedAppearanceComponent? appearance))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user