Seal/abstract/virtual everything (#6739)
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Content.Server.Destructible
|
||||
/// and triggers thresholds when reached.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class DestructibleComponent : Component
|
||||
public sealed class DestructibleComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("thresholds")]
|
||||
|
||||
@@ -12,7 +12,7 @@ using Robust.Shared.Random;
|
||||
namespace Content.Server.Destructible
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class DestructibleSystem : EntitySystem
|
||||
public sealed class DestructibleSystem : EntitySystem
|
||||
{
|
||||
[Dependency] public readonly IRobustRandom Random = default!;
|
||||
public new IEntityManager EntityManager => base.EntityManager;
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.Destructible
|
||||
/// <summary>
|
||||
/// Event raised when a <see cref="DamageThreshold"/> is reached.
|
||||
/// </summary>
|
||||
public class DamageThresholdReached : EntityEventArgs
|
||||
public sealed class DamageThresholdReached : EntityEventArgs
|
||||
{
|
||||
public readonly DestructibleComponent Parent;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class ChangeConstructionNodeBehavior : IThresholdBehavior
|
||||
public sealed class ChangeConstructionNodeBehavior : IThresholdBehavior
|
||||
{
|
||||
[DataField("node")]
|
||||
public string Node { get; private set; } = string.Empty;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class DoActsBehavior : IThresholdBehavior
|
||||
public sealed class DoActsBehavior : IThresholdBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// What acts should be triggered upon activation.
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class DumpCanisterBehavior : IThresholdBehavior
|
||||
public sealed class DumpCanisterBehavior : IThresholdBehavior
|
||||
{
|
||||
public void Execute(EntityUid owner, DestructibleSystem system)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
/// Drop all items from all containers
|
||||
/// </summary>
|
||||
[DataDefinition]
|
||||
public class EmptyAllContainersBehaviour : IThresholdBehavior
|
||||
public sealed class EmptyAllContainersBehaviour : IThresholdBehavior
|
||||
{
|
||||
public void Execute(EntityUid owner, DestructibleSystem system)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class ExplodeBehavior : IThresholdBehavior
|
||||
public sealed class ExplodeBehavior : IThresholdBehavior
|
||||
{
|
||||
public void Execute(EntityUid owner, DestructibleSystem system)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class GibBehavior : IThresholdBehavior
|
||||
public sealed class GibBehavior : IThresholdBehavior
|
||||
{
|
||||
[DataField("recursive")] private bool _recursive = true;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class PlaySoundBehavior : IThresholdBehavior
|
||||
public sealed class PlaySoundBehavior : IThresholdBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// Sound played upon destruction.
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class SpawnEntitiesBehavior : IThresholdBehavior
|
||||
public sealed class SpawnEntitiesBehavior : IThresholdBehavior
|
||||
{
|
||||
/// <summary>
|
||||
/// Entities spawned on reaching this threshold, from a min to a max.
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public class SpillBehavior : IThresholdBehavior
|
||||
public sealed class SpillBehavior : IThresholdBehavior
|
||||
{
|
||||
[DataField("solution")]
|
||||
public string? Solution;
|
||||
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Destructible.Thresholds
|
||||
{
|
||||
[DataDefinition]
|
||||
public class DamageThreshold
|
||||
public sealed class DamageThreshold
|
||||
{
|
||||
[DataField("behaviors")]
|
||||
private List<IThresholdBehavior> _behaviors = new();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Destructible.Thresholds.Triggers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class AndTrigger : IThresholdTrigger
|
||||
public sealed class AndTrigger : IThresholdTrigger
|
||||
{
|
||||
[DataField("triggers")]
|
||||
public List<IThresholdTrigger> Triggers { get; set; } = new();
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Destructible.Thresholds.Triggers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class DamageGroupTrigger : IThresholdTrigger
|
||||
public sealed class DamageGroupTrigger : IThresholdTrigger
|
||||
{
|
||||
[DataField("damageGroup", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<DamageGroupPrototype>))]
|
||||
public string DamageGroup { get; set; } = default!;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Destructible.Thresholds.Triggers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class DamageTrigger : IThresholdTrigger
|
||||
public sealed class DamageTrigger : IThresholdTrigger
|
||||
{
|
||||
/// <summary>
|
||||
/// The amount of damage at which this threshold will trigger.
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.Destructible.Thresholds.Triggers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class DamageTypeTrigger : IThresholdTrigger
|
||||
public sealed class DamageTypeTrigger : IThresholdTrigger
|
||||
{
|
||||
[DataField("damageType", required:true, customTypeSerializer: typeof(PrototypeIdSerializer<DamageTypePrototype>))]
|
||||
public string DamageType { get; set; } = default!;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Destructible.Thresholds.Triggers
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataDefinition]
|
||||
public class OrTrigger : IThresholdTrigger
|
||||
public sealed class OrTrigger : IThresholdTrigger
|
||||
{
|
||||
[DataField("triggers")]
|
||||
public List<IThresholdTrigger> Triggers { get; } = new();
|
||||
|
||||
Reference in New Issue
Block a user