Refactor standing to be ECS (#4142)

* Refactor standing to be ECS

E C S B A B Y

* DONE

* FIX IT FIX IT FIX IT

* IsDown event

* Change to methods

* Fixes

* Address some reviews

* Last of the Mohicans

* Final fixes

* Fix tests
This commit is contained in:
metalgearsloth
2021-06-27 19:02:46 +10:00
committed by GitHub
parent 97f4f0a9bd
commit 50cc526ebd
30 changed files with 328 additions and 268 deletions

View File

@@ -1,7 +1,6 @@
#nullable enable
using System;
using System.Linq;
using Content.Server.Standing;
using Content.Server.Stunnable.Components;
using Content.Server.UserInterface;
using Content.Shared.ActionBlocker;
@@ -9,8 +8,8 @@ using Content.Shared.DragDrop;
using Content.Shared.Hands;
using Content.Shared.Instruments;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Notification.Managers;
using Content.Shared.Standing;
using Content.Shared.Throwing;
using Robust.Server.GameObjects;
using Robust.Server.Player;
@@ -357,7 +356,7 @@ namespace Content.Server.Instruments
if (mob != null)
{
if (Handheld)
EntitySystem.Get<StandingStateSystem>().DropAllItemsInHands(mob, false);
EntitySystem.Get<StandingStateSystem>().Down(mob, false);
if (mob.TryGetComponent(out StunnableComponent? stun))
{