Refactor magic speak system to be a component added to actions (#36328)
This commit is contained in:
17
Content.Shared/Speech/Components/SpeakOnActionComponent.cs
Normal file
17
Content.Shared/Speech/Components/SpeakOnActionComponent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Content.Shared.Speech.EntitySystems;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Speech.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Action components which should write a message to ICChat on use
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedSpeakOnActionSystem))]
|
||||
public sealed partial class SpeakOnActionComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The ftl id of the sentence that the user will speak.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public LocId? Sentence;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Content.Shared.Chasm;
|
||||
using Content.Shared.Speech.Components;
|
||||
using Content.Shared.Speech.Muting;
|
||||
using System;
|
||||
|
||||
namespace Content.Shared.Speech.EntitySystems;
|
||||
|
||||
/// <summary>
|
||||
/// Once the chat refactor has happened, move the code from
|
||||
/// <see cref="Content.Server.Speech.EntitySystems.SpeakOnUseSystem"/>
|
||||
/// to here and set this class to sealed.
|
||||
/// </summary>
|
||||
public abstract class SharedSpeakOnActionSystem : EntitySystem;
|
||||
Reference in New Issue
Block a user