Fix PostMapInit tests not considering job containerspawns (#31538)
* Fix PostMapInit tests nto considering job containerspawns * fix
This commit is contained in:
@@ -17,6 +17,7 @@ using Robust.Shared.Map;
|
|||||||
using Robust.Shared.Map.Components;
|
using Robust.Shared.Map.Components;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Content.Shared.Station.Components;
|
using Content.Shared.Station.Components;
|
||||||
|
using FastAccessors;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using YamlDotNet.RepresentationModel;
|
using YamlDotNet.RepresentationModel;
|
||||||
|
|
||||||
@@ -251,6 +252,13 @@ namespace Content.IntegrationTests.Tests
|
|||||||
.Select(x => x.Job!.Value);
|
.Select(x => x.Job!.Value);
|
||||||
|
|
||||||
jobs.ExceptWith(spawnPoints);
|
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}.");
|
Assert.That(jobs, Is.Empty, $"There is no spawnpoints for {string.Join(", ", jobs)} on {mapProto}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using Content.Server.Spawners.EntitySystems;
|
using Content.Server.Spawners.EntitySystems;
|
||||||
|
using Content.Shared.Roles;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
|
||||||
namespace Content.Server.Spawners.Components;
|
namespace Content.Server.Spawners.Components;
|
||||||
|
|
||||||
@@ -20,7 +22,7 @@ public sealed partial class ContainerSpawnPointComponent : Component, ISpawnPoin
|
|||||||
/// An optional job specifier
|
/// An optional job specifier
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public string? Job;
|
public ProtoId<JobPrototype>? Job;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of spawn point
|
/// The type of spawn point
|
||||||
|
|||||||
@@ -232,6 +232,7 @@
|
|||||||
suffix: Job spawn
|
suffix: Job spawn
|
||||||
components:
|
components:
|
||||||
- type: ContainerSpawnPoint
|
- type: ContainerSpawnPoint
|
||||||
|
spawnType: Job
|
||||||
containerId: station_ai_mind_slot
|
containerId: station_ai_mind_slot
|
||||||
job: StationAi
|
job: StationAi
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
Reference in New Issue
Block a user