diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index d1172375b0fa..5771e0f06c08 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -17,6 +17,7 @@ using Robust.Shared.Map.Components; using Robust.Shared.Prototypes; using Content.Shared.Station.Components; +using FastAccessors; using Robust.Shared.Utility; using YamlDotNet.RepresentationModel; @@ -251,6 +252,13 @@ await server.WaitPost(() => .Select(x => x.Job!.Value); jobs.ExceptWith(spawnPoints); + + spawnPoints = entManager.EntityQuery() + .Where(x => x.SpawnType == SpawnPointType.Job) + .Select(x => x.Job!.Value); + + jobs.ExceptWith(spawnPoints); + Assert.That(jobs, Is.Empty, $"There is no spawnpoints for {string.Join(", ", jobs)} on {mapProto}."); } diff --git a/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs b/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs index 5c8e3c4186b5..210904b5671c 100644 --- a/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs +++ b/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs @@ -1,4 +1,6 @@ using Content.Server.Spawners.EntitySystems; +using Content.Shared.Roles; +using Robust.Shared.Prototypes; namespace Content.Server.Spawners.Components; @@ -20,7 +22,7 @@ public sealed partial class ContainerSpawnPointComponent : Component, ISpawnPoin /// An optional job specifier /// [DataField, ViewVariables(VVAccess.ReadWrite)] - public string? Job; + public ProtoId? Job; /// /// The type of spawn point diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 686f575e8bb1..23b2a318ebb2 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -232,6 +232,7 @@ suffix: Job spawn components: - type: ContainerSpawnPoint + spawnType: Job containerId: station_ai_mind_slot job: StationAi - type: Sprite