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

@@ -15,10 +15,10 @@ namespace Content.Server.Tools.Components
/// Not to be confused with Multitool (power)
/// </summary>
[RegisterComponent]
public class MultipleToolComponent : SharedMultipleToolComponent
public sealed class MultipleToolComponent : SharedMultipleToolComponent
{
[DataDefinition]
public class ToolEntry
public sealed class ToolEntry
{
[DataField("behavior", required:true)]
public PrototypeFlags<ToolQualityPrototype> Behavior { get; } = new();
@@ -32,7 +32,7 @@ namespace Content.Server.Tools.Components
[DataField("sprite")]
public SpriteSpecifier? Sprite { get; } = null;
}
[DataField("entries", required:true)]
public ToolEntry[] Entries { get; } = Array.Empty<ToolEntry>();

View File

@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Tools.Components
{
[RegisterComponent, Friend(typeof(ToolSystem))]
public class ToolComponent : Component
public sealed class ToolComponent : Component
{
[DataField("qualities")]
public PrototypeFlags<ToolQualityPrototype> Qualities { get; set; } = new();

View File

@@ -10,7 +10,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Server.Tools.Components
{
[RegisterComponent]
public class WelderComponent : SharedWelderComponent
public sealed class WelderComponent : SharedWelderComponent
{
/// <summary>
/// Solution on the entity that contains the fuel.
@@ -56,7 +56,7 @@ namespace Content.Server.Tools.Components
/// </summary>
/// <remarks>
/// If this is a standard welder, this damage bonus should probably subtract the entity's standard melee weapon damage
/// and replace it all with heat damage.
/// and replace it all with heat damage.
/// </remarks>
[DataField("litMeleeDamageBonus")]
public DamageSpecifier LitMeleeDamageBonus = new();

View File

@@ -15,7 +15,7 @@ using Robust.Shared.Prototypes;
namespace Content.Server.Tools
{
public partial class ToolSystem
public sealed partial class ToolSystem
{
private void InitializeMultipleTools()
{

View File

@@ -22,7 +22,7 @@ using Robust.Shared.Player;
namespace Content.Server.Tools
{
public partial class ToolSystem
public sealed partial class ToolSystem
{
private readonly HashSet<EntityUid> _activeWelders = new();

View File

@@ -18,7 +18,7 @@ using Robust.Shared.Prototypes;
namespace Content.Server.Tools
{
public partial class ToolSystem : EntitySystem
public sealed partial class ToolSystem : EntitySystem
{
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
@@ -259,7 +259,7 @@ namespace Content.Server.Tools
UpdateWelders(frameTime);
}
private class ToolDoAfterComplete : EntityEventArgs
private sealed class ToolDoAfterComplete : EntityEventArgs
{
public readonly object CompletedEvent;
public readonly object? CancelledEvent;
@@ -279,7 +279,7 @@ namespace Content.Server.Tools
}
}
private class ToolDoAfterCancelled : EntityEventArgs
private sealed class ToolDoAfterCancelled : EntityEventArgs
{
public readonly object Event;
public readonly EntityUid? EventTarget;
@@ -296,7 +296,7 @@ namespace Content.Server.Tools
/// Attempt event called *before* any do afters to see if the tool usage should succeed or not.
/// You can change the fuel consumption by changing the Fuel property.
/// </summary>
public class ToolUseAttemptEvent : CancellableEntityEventArgs
public sealed class ToolUseAttemptEvent : CancellableEntityEventArgs
{
public float Fuel { get; set; }
public EntityUid User { get; }
@@ -312,7 +312,7 @@ namespace Content.Server.Tools
/// Attempt event called *after* any do afters to see if the tool usage should succeed or not.
/// You can use this event to consume any fuel needed.
/// </summary>
public class ToolUseFinishAttemptEvent : CancellableEntityEventArgs
public sealed class ToolUseFinishAttemptEvent : CancellableEntityEventArgs
{
public float Fuel { get; }
public EntityUid User { get; }