using Content.Shared.Chat; using Robust.Shared.Prototypes; namespace Content.Shared.Language; [Prototype("language")] public sealed class LanguagePrototype : IPrototype { [IdDataField] public string ID { get; private set; } = default!; /// /// Obfuscation method used by this language. By default, uses /// [DataField("obfuscation")] public ObfuscationMethod Obfuscation = ObfuscationMethod.Default; /// /// Speech overrides used for messages sent in this language. /// [DataField("speech")] public SpeechOverrideInfo SpeechOverride = new(); #region utility /// /// The in-world name of this language, localized. /// public string Name => Loc.GetString($"language-{ID}-name"); /// /// The in-world description of this language, localized. /// public string Description => Loc.GetString($"language-{ID}-description"); #endregion utility } [DataDefinition] public sealed partial class SpeechOverrideInfo { [DataField] public Color Color = Color.White; [DataField] public string? FontId; [DataField] public int? FontSize; [DataField] public bool AllowRadio = true; /// /// If false, the entity can use this language even when it's unable to speak (i.e. muffled or muted), /// and accents are not applied to messages in this language. /// [DataField] public bool RequireSpeech = true; /// /// If not null, all messages in this language will be forced to be spoken in this chat type. /// [DataField] public InGameICChatType? ChatTypeOverride; /// /// Speech verb overrides. If not provided, the default ones for the entity are used. /// [DataField] public List? SpeechVerbOverrides; /// /// Overrides for different kinds chat message wraps. If not provided, the default ones are used. /// /// /// Currently, only local chat and whispers support this. Radio and emotes are unaffected. /// This is horrible. /// [DataField] public Dictionary MessageWrapOverrides = new(); }