Refactors stunnable to be ECS. (#4819)
Also cleans up StandingStatesystem.
This commit is contained in:
committed by
GitHub
parent
19a588a70a
commit
6eee256b11
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Server.Stunnable;
|
||||
using Content.Server.Stunnable.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.ActionBlocker;
|
||||
@@ -8,6 +9,7 @@ using Content.Shared.Instruments;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
@@ -364,7 +366,7 @@ namespace Content.Server.Instruments
|
||||
|
||||
if (mob.TryGetComponent(out StunnableComponent? stun))
|
||||
{
|
||||
stun.Stun(1);
|
||||
EntitySystem.Get<StunSystem>().Stun(mob.Uid, TimeSpan.FromSeconds(1), stun);
|
||||
Clean();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user