Use Uid for standingstate methods (#4856)

This commit is contained in:
metalgearsloth
2021-10-13 18:58:18 +11:00
committed by GitHub
parent 60da7aeb8d
commit 2f3914e01e
10 changed files with 15 additions and 35 deletions

View File

@@ -130,11 +130,11 @@ namespace Content.Server.Buckle.Components
ownTransform.WorldRotation = strapTransform.WorldRotation;
break;
case StrapPosition.Stand:
EntitySystem.Get<StandingStateSystem>().Stand(Owner);
EntitySystem.Get<StandingStateSystem>().Stand(Owner.Uid);
ownTransform.WorldRotation = strapTransform.WorldRotation;
break;
case StrapPosition.Down:
EntitySystem.Get<StandingStateSystem>().Down(Owner, false, false);
EntitySystem.Get<StandingStateSystem>().Down(Owner.Uid, false, false);
ownTransform.LocalRotation = Angle.Zero;
break;
}
@@ -339,11 +339,11 @@ namespace Content.Server.Buckle.Components
if (_stunnable is { KnockedDown: true }
|| (_mobState?.IsIncapacitated() ?? false))
{
EntitySystem.Get<StandingStateSystem>().Down(Owner);
EntitySystem.Get<StandingStateSystem>().Down(Owner.Uid);
}
else
{
EntitySystem.Get<StandingStateSystem>().Stand(Owner);
EntitySystem.Get<StandingStateSystem>().Stand(Owner.Uid);
}
_mobState?.CurrentState?.EnterState(Owner);

View File

@@ -362,7 +362,7 @@ namespace Content.Server.Instruments
if (mob != null)
{
if (Handheld)
EntitySystem.Get<StandingStateSystem>().Down(mob, false);
EntitySystem.Get<StandingStateSystem>().Down(mob.Uid, false);
if (mob.TryGetComponent(out StunnableComponent? stun))
{

View File

@@ -40,7 +40,7 @@ namespace Content.Server.Morgue.Components
protected override bool AddToContents(IEntity entity)
{
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity)) return false;
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity.Uid)) return false;
return base.AddToContents(entity);
}

View File

@@ -142,7 +142,7 @@ namespace Content.Server.Morgue.Components
if (CanInsert(victim))
{
Insert(victim);
EntitySystem.Get<StandingStateSystem>().Down(victim, false);
EntitySystem.Get<StandingStateSystem>().Down(victim.Uid, false);
}
else
{

View File

@@ -68,7 +68,7 @@ namespace Content.Server.Morgue.Components
protected override bool AddToContents(IEntity entity)
{
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity))
if (entity.HasComponent<SharedBodyComponent>() && !EntitySystem.Get<StandingStateSystem>().IsDown(entity.Uid))
return false;
return base.AddToContents(entity);
}