Remove ghost role component references (#15262)

This commit is contained in:
DrSmugleaf
2023-04-12 06:32:14 -07:00
committed by GitHub
parent 284f6b99b9
commit 9146374e39
30 changed files with 258 additions and 182 deletions

View File

@@ -18,6 +18,7 @@ using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Server.Traitor;
using Content.Shared.Dataset;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Nuke;
@@ -31,7 +32,6 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using Content.Shared.Humanoid.Prototypes;
namespace Content.Server.GameTicking.Rules;
@@ -770,9 +770,10 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
else if (addSpawnPoints)
{
var spawnPoint = EntityManager.SpawnEntity(_nukeopsRuleConfig.GhostSpawnPointProto, _random.Pick(spawns));
var spawner = EnsureComp<GhostRoleMobSpawnerComponent>(spawnPoint);
spawner.RoleName = Loc.GetString(nukeOpsAntag.Name);
spawner.RoleDescription = Loc.GetString(nukeOpsAntag.Objective);
var ghostRole = EnsureComp<GhostRoleComponent>(spawnPoint);
EnsureComp<GhostRoleMobSpawnerComponent>(spawnPoint);
ghostRole.RoleName = Loc.GetString(nukeOpsAntag.Name);
ghostRole.RoleDescription = Loc.GetString(nukeOpsAntag.Objective);
var nukeOpSpawner = EnsureComp<NukeOperativeSpawnerComponent>(spawnPoint);
nukeOpSpawner.OperativeName = spawnDetails.Name;