From cf1901508621b4b5cf864fa1067c5eb1dfd05470 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Sat, 8 Apr 2023 16:52:52 -0700 Subject: [PATCH] Remove spawn point component references (#15222) --- Content.Client/Entry/EntryPoint.cs | 2 - .../Components/SpawnPointComponent.cs | 43 +++++++++---------- .../Markers/SharedSpawnPointComponent.cs | 7 --- 3 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 Content.Shared/Markers/SharedSpawnPointComponent.cs diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index 5901146f89..1d30169019 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -23,7 +23,6 @@ using Content.Shared.Administration; using Content.Shared.AME; using Content.Shared.Gravity; using Content.Shared.Localizations; -using Content.Shared.Markers; using Robust.Client; using Robust.Client.Graphics; using Robust.Client.Input; @@ -85,7 +84,6 @@ namespace Content.Client.Entry _componentFactory.IgnoreMissingComponents(); // Do not add to these, they are legacy. - _componentFactory.RegisterClass(); _componentFactory.RegisterClass(); _componentFactory.RegisterClass(); // Do not add to the above, they are legacy diff --git a/Content.Server/Spawners/Components/SpawnPointComponent.cs b/Content.Server/Spawners/Components/SpawnPointComponent.cs index 53e69d921f..f520f06f4f 100644 --- a/Content.Server/Spawners/Components/SpawnPointComponent.cs +++ b/Content.Server/Spawners/Components/SpawnPointComponent.cs @@ -1,31 +1,28 @@ -using Content.Shared.Markers; using Content.Shared.Roles; using Robust.Shared.Prototypes; -namespace Content.Server.Spawners.Components +namespace Content.Server.Spawners.Components; + +[RegisterComponent] +public sealed class SpawnPointComponent : Component { - [RegisterComponent] - [ComponentReference(typeof(SharedSpawnPointComponent))] - public sealed class SpawnPointComponent : SharedSpawnPointComponent - { - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [ViewVariables(VVAccess.ReadWrite)] - [DataField("job_id")] - private string? _jobId; + [ViewVariables(VVAccess.ReadWrite)] + [DataField("job_id")] + private string? _jobId; - [ViewVariables(VVAccess.ReadWrite)] - [DataField("spawn_type")] - public SpawnPointType SpawnType { get; } = SpawnPointType.Unset; + [ViewVariables(VVAccess.ReadWrite)] + [DataField("spawn_type")] + public SpawnPointType SpawnType { get; } = SpawnPointType.Unset; - public JobPrototype? Job => string.IsNullOrEmpty(_jobId) ? null : _prototypeManager.Index(_jobId); - } - - public enum SpawnPointType - { - Unset = 0, - LateJoin, - Job, - Observer, - } + public JobPrototype? Job => string.IsNullOrEmpty(_jobId) ? null : _prototypeManager.Index(_jobId); +} + +public enum SpawnPointType +{ + Unset = 0, + LateJoin, + Job, + Observer, } diff --git a/Content.Shared/Markers/SharedSpawnPointComponent.cs b/Content.Shared/Markers/SharedSpawnPointComponent.cs deleted file mode 100644 index 845bee9bcf..0000000000 --- a/Content.Shared/Markers/SharedSpawnPointComponent.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Content.Shared.Markers -{ - [Virtual] - public class SharedSpawnPointComponent : Component - { - } -}