Files
tbd-station-14/Content.Server/Traitor/TraitorRole.cs
keronshb ac87effca0 [Revert] Reverts Ninja (#15516)
* Revert "[Antag] add space ninja as midround antag (#14069)"

This reverts commit c1cda0dbf8.

* Revert "[Fix] move ninja objectives into NinjaRole (#15490)"

This reverts commit 251f429fb3.
2023-04-19 01:43:09 -06:00

32 lines
1.0 KiB
C#

using Content.Server.Chat.Managers;
using Content.Server.Roles;
using Content.Shared.Roles;
namespace Content.Server.Traitor
{
public sealed class TraitorRole : Role
{
public AntagPrototype Prototype { get; }
public TraitorRole(Mind.Mind mind, AntagPrototype antagPrototype) : base(mind)
{
Prototype = antagPrototype;
Name = Loc.GetString(antagPrototype.Name);
Antagonist = antagPrototype.Antagonist;
}
public override string Name { get; }
public override bool Antagonist { get; }
public void GreetTraitor(string[] codewords)
{
if (Mind.TryGetSession(out var session))
{
var chatMgr = IoCManager.Resolve<IChatManager>();
chatMgr.DispatchServerMessage(session, Loc.GetString("traitor-role-greeting"));
chatMgr.DispatchServerMessage(session, Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords))));
}
}
}
}