Add Job preference tests (#28625)
* Misc Job related changes * Add JobTest * A * Aa * Lets not confuse the yaml linter * fixes * a
This commit is contained in:
@@ -6,11 +6,8 @@ namespace Content.Server.Spawners.Components;
|
||||
[RegisterComponent]
|
||||
public sealed partial class SpawnPointComponent : Component, ISpawnPoint
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("job_id")]
|
||||
private string? _jobId;
|
||||
public ProtoId<JobPrototype>? Job;
|
||||
|
||||
/// <summary>
|
||||
/// The type of spawn point
|
||||
@@ -18,11 +15,9 @@ public sealed partial class SpawnPointComponent : Component, ISpawnPoint
|
||||
[DataField("spawn_type"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public SpawnPointType SpawnType { get; set; } = SpawnPointType.Unset;
|
||||
|
||||
public JobPrototype? Job => string.IsNullOrEmpty(_jobId) ? null : _prototypeManager.Index<JobPrototype>(_jobId);
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{_jobId} {SpawnType}";
|
||||
return $"{Job} {SpawnType}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user