Don't enable ghost roles for salvage spawns (#15598)

This commit is contained in:
metalgearsloth
2023-04-21 15:06:22 +10:00
committed by GitHub
parent 857c1462be
commit 3d1333b9ab
2 changed files with 25 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Content.Server.Atmos;
using Content.Server.Atmos.Components;
using Content.Server.CPUJob.JobQueues;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Parallax;
using Content.Server.Procedural;
using Content.Server.Salvage.Expeditions;
@@ -359,7 +360,10 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
foreach (var entry in EntitySpawnCollection.GetSpawns(mobGroup.Entries, random))
{
_entManager.SpawnEntity(entry, spawnPosition);
var uid = _entManager.CreateEntityUninitialized(entry, spawnPosition);
_entManager.RemoveComponent<GhostTakeoverAvailableComponent>(uid);
_entManager.RemoveComponent<GhostRoleComponent>(uid);
_entManager.InitializeAndStartEntity(uid);
}
await SuspendIfOutOfTime();