Fix PostMapInit tests not considering job containerspawns (#31538)

* Fix PostMapInit tests nto considering job containerspawns

* fix
This commit is contained in:
metalgearsloth
2024-08-28 12:42:06 +10:00
committed by GitHub
parent 14b3e0ce24
commit 99a41a12ab
3 changed files with 12 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Map;
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 @@ namespace Content.IntegrationTests.Tests
.Select(x => x.Job!.Value);
jobs.ExceptWith(spawnPoints);
spawnPoints = entManager.EntityQuery<ContainerSpawnPointComponent>()
.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}.");
}

View File

@@ -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
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string? Job;
public ProtoId<JobPrototype>? Job;
/// <summary>
/// The type of spawn point

View File

@@ -232,6 +232,7 @@
suffix: Job spawn
components:
- type: ContainerSpawnPoint
spawnType: Job
containerId: station_ai_mind_slot
job: StationAi
- type: Sprite