Adds jittering. (#4809)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
committed by
GitHub
parent
05cd30b564
commit
67fd509c9f
@@ -5,6 +5,7 @@ using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Server.Stunnable.Components;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Jittering;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Robust.Server.Player;
|
||||
@@ -71,6 +72,11 @@ namespace Content.Server.Administration.Commands
|
||||
{
|
||||
EntitySystem.Get<CreamPieSystem>().SetCreamPied(target.Uid, creamPied, false);
|
||||
}
|
||||
|
||||
if (target.HasComponent<JitteringComponent>())
|
||||
{
|
||||
target.RemoveComponent<JitteringComponent>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
Content.Server/Jittering/JitteringSystem.cs
Normal file
9
Content.Server/Jittering/JitteringSystem.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Content.Shared.Jittering;
|
||||
|
||||
namespace Content.Server.Jittering
|
||||
{
|
||||
public class JitteringSystem : SharedJitteringSystem
|
||||
{
|
||||
// This entity system only exists on the server so it will be registered, otherwise we can't use SharedJitteringSystem...
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Server.Items;
|
||||
using Content.Server.Jittering;
|
||||
using Content.Server.PowerCell.Components;
|
||||
using Content.Server.Stunnable.Components;
|
||||
using Content.Server.Weapon.Melee;
|
||||
@@ -70,6 +72,8 @@ namespace Content.Server.Stunnable
|
||||
if (!Get<ActionBlockerSystem>().CanUse(args.User))
|
||||
return;
|
||||
|
||||
Get<JitteringSystem>().DoJitter(args.User.Uid, TimeSpan.FromMinutes(1), 20f, 8f);
|
||||
|
||||
if (comp.Activated)
|
||||
{
|
||||
TurnOff(comp);
|
||||
|
||||
Reference in New Issue
Block a user