fix the fact that RandomSentience was not actually making a ghost role. Oops!

This commit is contained in:
moonheart08
2022-02-25 23:40:15 -06:00
parent ff7d4ed9f6
commit 44d5d41d60
3 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
using System.Linq;
using Content.Server.Chat.Managers;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Mind.Commands;
using Content.Server.StationEvents.Components;
using Robust.Shared.Random;
@@ -35,6 +36,9 @@ public sealed class RandomSentience : StationEvent
MakeSentientCommand.MakeSentient(target.Owner, _entityManager);
_entityManager.RemoveComponent<SentienceTargetComponent>(target.Owner);
var comp = _entityManager.AddComponent<GhostTakeoverAvailableComponent>(target.Owner);
comp.RoleName = _entityManager.GetComponent<MetaDataComponent>(target.Owner).EntityName;
comp.RoleDescription = Loc.GetString("station-event-random-sentience-role-description", ("name", comp.RoleName));
groups.Add(target.FlavorKind);
}