Remove IDestroyAct, IBreakAct (#7876)
This commit is contained in:
@@ -4,7 +4,6 @@ using Content.Server.Destructible.Thresholds.Behaviors;
|
||||
using Content.Server.Destructible.Thresholds.Triggers;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Acts;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.FixedPoint;
|
||||
using JetBrains.Annotations;
|
||||
@@ -12,16 +11,16 @@ using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using System;
|
||||
using Content.Shared.Destructible;
|
||||
|
||||
namespace Content.Server.Destructible
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class DestructibleSystem : EntitySystem
|
||||
public sealed class DestructibleSystem : SharedDestructibleSystem
|
||||
{
|
||||
[Dependency] public readonly IRobustRandom Random = default!;
|
||||
public new IEntityManager EntityManager => base.EntityManager;
|
||||
|
||||
[Dependency] public readonly ActSystem ActSystem = default!;
|
||||
[Dependency] public readonly AudioSystem AudioSystem = default!;
|
||||
[Dependency] public readonly ConstructionSystem ConstructionSystem = default!;
|
||||
[Dependency] public readonly ExplosionSystem ExplosionSystem = default!;
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using Content.Shared.Acts;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
@@ -11,7 +6,6 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
/// <summary>
|
||||
/// What acts should be triggered upon activation.
|
||||
/// See <see cref="ActSystem"/>.
|
||||
/// </summary>
|
||||
[DataField("acts")]
|
||||
public ThresholdActs Acts { get; set; }
|
||||
@@ -25,12 +19,12 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
if (HasAct(ThresholdActs.Breakage))
|
||||
{
|
||||
system.ActSystem.HandleBreakage(owner);
|
||||
system.BreakEntity(owner);
|
||||
}
|
||||
|
||||
if (HasAct(ThresholdActs.Destruction))
|
||||
{
|
||||
system.ActSystem.HandleDestruction(owner);
|
||||
system.DestroyEntity(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user