fish-station/Content.Server/Roles/RoleSystem.cs
Vigers Ray bcb9508552
Говнокрад (#268)
* real?

* ok

* real 2

* one more thing that i forgot to port part 2

* i am dumb

* mofo og

* waaaagh

* some rework placeholders

* porting part 2

* bruh.

* bruh 2

* bruh 3.

* Update ChangelingRuleSystem.cs

* Update AdminVerbSystem.Antags.cs

* говнокрад это SubGamemode

* тяжело...

* пу-пу-пу

---------

Co-authored-by: whateverusername0 <whateveremail>
Co-authored-by: username <113782077+whateverusername0@users.noreply.github.com>
2024-08-08 09:28:44 +03:00

72 lines
2 KiB
C#

using Content.Server._Sunrise.EvilTwin;
using Content.Server._Sunrise.Fugitive;
using Content.Server._Sunrise.PlanetPrison;
using Content.Shared.Roles;
namespace Content.Server.Roles;
public sealed class RoleSystem : SharedRoleSystem
{
public override void Initialize()
{
// TODO make roles entities
base.Initialize();
SubscribeAntagEvents<DragonRoleComponent>();
SubscribeAntagEvents<InitialInfectedRoleComponent>();
SubscribeAntagEvents<NinjaRoleComponent>();
SubscribeAntagEvents<NukeopsRoleComponent>();
SubscribeAntagEvents<RevolutionaryRoleComponent>();
SubscribeAntagEvents<SubvertedSiliconRoleComponent>();
SubscribeAntagEvents<TraitorRoleComponent>();
SubscribeAntagEvents<ZombieRoleComponent>();
SubscribeAntagEvents<ThiefRoleComponent>();
SubscribeAntagEvents<ChangelingRoleComponent>();
// Sunrise-start
SubscribeAntagEvents<FugitiveRoleComponent>();
SubscribeAntagEvents<PlanetPrisonerRoleComponent>();
SubscribeAntagEvents<EvilTwinRoleComponent>();
// Sunrise-end
}
public string? MindGetBriefing(EntityUid? mindId)
{
if (mindId == null)
return null;
var ev = new GetBriefingEvent();
RaiseLocalEvent(mindId.Value, ref ev);
return ev.Briefing;
}
}
/// <summary>
/// Event raised on the mind to get its briefing.
/// Handlers can either replace or append to the briefing, whichever is more appropriate.
/// </summary>
[ByRefEvent]
public sealed class GetBriefingEvent
{
public string? Briefing;
public GetBriefingEvent(string? briefing = null)
{
Briefing = briefing;
}
/// <summary>
/// If there is no briefing, sets it to the string.
/// If there is a briefing, adds a new line to separate it from the appended string.
/// </summary>
public void Append(string text)
{
if (Briefing == null)
{
Briefing = text;
}
else
{
Briefing += "\n" + text;
}
}
}