Remove spawn point component references (#15222)

This commit is contained in:
DrSmugleaf
2023-04-08 16:52:52 -07:00
committed by GitHub
parent 34bcd042d1
commit cf19015086
3 changed files with 20 additions and 32 deletions

View File

@@ -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<JobPrototype>(_jobId);
}
public enum SpawnPointType
{
Unset = 0,
LateJoin,
Job,
Observer,
}
public JobPrototype? Job => string.IsNullOrEmpty(_jobId) ? null : _prototypeManager.Index<JobPrototype>(_jobId);
}
public enum SpawnPointType
{
Unset = 0,
LateJoin,
Job,
Observer,
}