Files
tbd-station-14/Content.Server/Roles/RoleSystem.cs
deltanedas 52532e4075 exterminator midround minor antag (#19946)
* terminator locale

* terminate objective

* terminator components and shared system

* terminator roles rules and system

* terminator events

* skeleton recolour

* terminator and endoskeleton

* ghost role spawn

* damage modifier sets

* :trollface:

* :trollface:

* add antag prototype

* ghost role locale

* skynet

* :trollface:

* :trollface:

* :trollface:

* add endoskeleton body prototype

* :trollface:

* :trollface:

* smite locale

* implement terminate smite

* :trollface:

* :trollface:

* implement PopupBehavior

* endoskeleton transform popup

* move stuff from shared to server since nothing actually used it

* recolour everything

* update parts

* :trollface:

* :trollface:

* ok fire was using the damage set, back to 1.0

* tweak

* :trollface:

* :trollface:

* simplemob ops

* 1 rule per pro

* :trollface:

* :trollface:

* update some sprites

* structural damage

* :trollface:

* :trollface:

* Revert "update some sprites"

This reverts commit 459196c6a8942c5412885d5fe2f1a83a48408ddc.

* offbrand, add die objective to maybe remove fear of murderbone

* add shut down objective to the list

* fix ghost role

* fix control mob

* :trollface:

* :trollface:

* please

* naming

* code changes for GenericAntag terminator

* yml changes for GenericAntag terminator

* :trollface:

* moved kill objective override to an objective component

* use kill objective override

* fix

* oh

* locale changes

* change burn to heat for skin melting gib

* change some endoskeleton stuff

* pro

* i already did this dementia ops

* objective

* fix

* pro

* swap out full sprite

* update parts

* forgor

* fix mind transfer

* type

* endoskeleton has 500 mass

* evil

* fishops

* warops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-12-24 20:16:56 -07:00

65 lines
1.7 KiB
C#

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<TerminatorRoleComponent>();
SubscribeAntagEvents<TraitorRoleComponent>();
SubscribeAntagEvents<ZombieRoleComponent>();
SubscribeAntagEvents<ThiefRoleComponent>();
}
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;
}
}
}