Seal/abstract/virtual everything (#6739)

This commit is contained in:
mirrorcult
2022-02-16 00:23:23 -07:00
committed by GitHub
parent 4dfcacb86a
commit ec4d4688c7
1771 changed files with 2216 additions and 2164 deletions

View File

@@ -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")]

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.

View File

@@ -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;

View File

@@ -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();

View File

@@ -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();

View File

@@ -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!;

View File

@@ -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.

View File

@@ -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!;

View File

@@ -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();