PAI ghost role fix (#16674)
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Content.Server.PAI
|
|||||||
|
|
||||||
EntityManager.GetComponent<MetaDataComponent>(component.Owner).EntityName = val;
|
EntityManager.GetComponent<MetaDataComponent>(component.Owner).EntityName = val;
|
||||||
|
|
||||||
var ghostRole = AddComp<GhostRoleComponent>(uid);
|
var ghostRole = EnsureComp<GhostRoleComponent>(uid);
|
||||||
EnsureComp<GhostTakeoverAvailableComponent>(uid);
|
EnsureComp<GhostTakeoverAvailableComponent>(uid);
|
||||||
|
|
||||||
ghostRole.RoleName = Loc.GetString("pai-system-role-name");
|
ghostRole.RoleName = Loc.GetString("pai-system-role-name");
|
||||||
@@ -165,6 +165,7 @@ namespace Content.Server.PAI
|
|||||||
if (EntityManager.HasComponent<GhostTakeoverAvailableComponent>(uid))
|
if (EntityManager.HasComponent<GhostTakeoverAvailableComponent>(uid))
|
||||||
{
|
{
|
||||||
EntityManager.RemoveComponent<GhostTakeoverAvailableComponent>(uid);
|
EntityManager.RemoveComponent<GhostTakeoverAvailableComponent>(uid);
|
||||||
|
EntityManager.RemoveComponent<GhostRoleComponent>(uid);
|
||||||
_popupSystem.PopupEntity(Loc.GetString("pai-system-stopped-searching"), uid, args.User);
|
_popupSystem.PopupEntity(Loc.GetString("pai-system-stopped-searching"), uid, args.User);
|
||||||
PAITurningOff(uid);
|
PAITurningOff(uid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user