2021-06-21 02:13:54 +02:00
|
|
|
using Content.Server.Chat.Managers;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Roles;
|
2021-12-26 06:13:37 +03:00
|
|
|
using Content.Shared.Roles;
|
2020-12-01 17:05:19 +01:00
|
|
|
using Robust.Shared.IoC;
|
|
|
|
|
using Robust.Shared.Localization;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Traitor
|
2020-12-01 17:05:19 +01:00
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class TraitorRole : Role
|
2020-12-01 17:05:19 +01:00
|
|
|
{
|
2021-12-26 06:13:37 +03:00
|
|
|
public AntagPrototype Prototype { get; }
|
|
|
|
|
|
|
|
|
|
public TraitorRole(Mind.Mind mind, AntagPrototype antagPrototype) : base(mind)
|
2020-12-01 17:05:19 +01:00
|
|
|
{
|
2021-12-26 06:13:37 +03:00
|
|
|
Prototype = antagPrototype;
|
|
|
|
|
Name = antagPrototype.Name;
|
|
|
|
|
Antagonist = antagPrototype.Antagonist;
|
2020-12-01 17:05:19 +01:00
|
|
|
}
|
|
|
|
|
|
2021-12-26 06:13:37 +03:00
|
|
|
public override string Name { get; }
|
|
|
|
|
public override bool Antagonist { get; }
|
2020-12-01 17:05:19 +01:00
|
|
|
|
|
|
|
|
public void GreetTraitor(string[] codewords)
|
|
|
|
|
{
|
2021-03-16 15:50:20 +01:00
|
|
|
if (Mind.TryGetSession(out var session))
|
|
|
|
|
{
|
|
|
|
|
var chatMgr = IoCManager.Resolve<IChatManager>();
|
2021-06-21 02:13:54 +02:00
|
|
|
chatMgr.DispatchServerMessage(session, Loc.GetString("traitor-role-greeting"));
|
|
|
|
|
chatMgr.DispatchServerMessage(session, Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords))));
|
2021-03-16 15:50:20 +01:00
|
|
|
}
|
2020-12-01 17:05:19 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|