Refactor PacificationSystem (#18715)
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for enforcing pacifism.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PacifistComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Content.Shared.CombatMode.Pacification;
|
||||
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
|
||||
/// <summary>
|
||||
/// This handles enforced pacifism.
|
||||
/// </summary>
|
||||
public sealed class PacifistSystem : EntitySystem
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in EntityQuery<PacifistComponent>())
|
||||
{
|
||||
EnsureComp<PacifiedComponent>(comp.Owner); // It's a status effect so just enforce it.
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user