Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PostMapInit tests not considering job containerspawns #31538

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -251,6 +252,13 @@ await server.WaitPost(() =>
.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}.");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Content.Server.Spawners.EntitySystems;
using Content.Shared.Roles;
using Robust.Shared.Prototypes;

namespace Content.Server.Spawners.Components;

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
suffix: Job spawn
components:
- type: ContainerSpawnPoint
spawnType: Job
containerId: station_ai_mind_slot
job: StationAi
- type: Sprite
Expand Down
Loading