Refactors stunnable to be ECS. (#4819)
Also cleans up StandingStatesystem.
This commit is contained in:
committed by
GitHub
parent
19a588a70a
commit
6eee256b11
@@ -1,14 +1,18 @@
|
||||
using System;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Shared.Nutrition.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public abstract class SharedCreamPieSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private SharedStunSystem _stunSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -64,9 +68,9 @@ namespace Content.Shared.Nutrition.EntitySystems
|
||||
|
||||
CreamedEntity(uid, creamPied, args);
|
||||
|
||||
if (EntityManager.TryGetComponent(uid, out SharedStunnableComponent? stun))
|
||||
if (EntityManager.TryGetComponent(uid, out StunnableComponent? stun))
|
||||
{
|
||||
stun.Paralyze(creamPie.ParalyzeTime);
|
||||
_stunSystem.Paralyze(uid, TimeSpan.FromSeconds(creamPie.ParalyzeTime), stun);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user