Trigger Refactor (#39034)

This commit is contained in:
slarticodefast
2025-08-03 21:20:37 +02:00
committed by GitHub
parent 777e89ab3e
commit 2c40a950f7
256 changed files with 3987 additions and 2892 deletions

View File

@@ -0,0 +1,30 @@
using Content.Shared.Mobs;
using Content.Shared.Radio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Sends an emergency message over coms when triggered giving information about the entity's mob status.
/// If TargetUser is true then the user's mob state will be used instead.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class RattleOnTriggerComponent : BaseXOnTriggerComponent
{
/// <summary>
/// The radio channel the message will be sent to.
/// </summary>
[DataField]
public ProtoId<RadioChannelPrototype> RadioChannel = "Syndicate";
/// <summary>
/// The message to be send depending on the target's current mob state.
/// </summary>
[DataField]
public Dictionary<MobState, LocId> Messages = new()
{
{MobState.Critical, "deathrattle-implant-critical-message"},
{MobState.Dead, "deathrattle-implant-dead-message"}
};
}