Remove ghost role component references (#15262)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Speech.Components;
|
||||
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Server.Ghost.Roles.Components;
|
||||
|
||||
namespace Content.Server.Chemistry.ReagentEffects;
|
||||
|
||||
@@ -26,16 +25,18 @@ public sealed class MakeSentient : ReagentEffect
|
||||
}
|
||||
|
||||
// No idea what anything past this point does
|
||||
if (entityManager.TryGetComponent(uid, out GhostTakeoverAvailableComponent? takeOver))
|
||||
if (entityManager.TryGetComponent(uid, out GhostRoleComponent? ghostRole) ||
|
||||
entityManager.TryGetComponent(uid, out GhostTakeoverAvailableComponent? takeOver))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
takeOver = entityManager.AddComponent<GhostTakeoverAvailableComponent>(uid);
|
||||
ghostRole = entityManager.AddComponent<GhostRoleComponent>(uid);
|
||||
entityManager.AddComponent<GhostTakeoverAvailableComponent>(uid);
|
||||
|
||||
var entityData = entityManager.GetComponent<MetaDataComponent>(uid);
|
||||
takeOver.RoleName = entityData.EntityName;
|
||||
takeOver.RoleDescription = Loc.GetString("ghost-role-information-cognizine-description");
|
||||
ghostRole.RoleName = entityData.EntityName;
|
||||
ghostRole.RoleDescription = Loc.GetString("ghost-role-information-cognizine-description");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user