Refactor magic speak system to be a component added to actions (#36328)

This commit is contained in:
J
2025-05-04 18:34:19 +01:00
committed by GitHub
parent 81cbb31425
commit 7b352643d5
28 changed files with 115 additions and 115 deletions

View 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;
}

View File

@@ -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;