Trigger Refactor (#39034)
This commit is contained in:
@@ -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"}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user