using Content.Shared.Chat; using Robust.Shared.Prototypes; namespace Content.Shared.Language; [Prototype("language")] public sealed partial class LanguagePrototype : IPrototype { [IdDataField] public string ID { get; private set; } = default!; /// /// Whether this language will display its name in chat behind a player's name. /// [DataField] public bool IsVisibleLanguage { get; set; } /// /// 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 chat abbreviation of this language, localized. /// public string ChatName => Loc.GetString($"chat-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 { /// /// Color which text in this language will be blended with. /// Alpha blending is used, which means the alpha component of the color controls the intensity of this color. /// [DataField] public Color? Color = null; [DataField] public string? FontId; [DataField] public int? FontSize; [DataField] public bool AllowRadio = true; /// /// If true, the message will be relayed to the Empathy Chat and /// anyone with that language will also hear Empathy Chat. (Unless user has ShadowkinBlackeyeComponent) /// This is mostly only use for "Marish" but... fuckit modularity :p /// [DataField] public bool EmpathySpeech = false; /// /// 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(); }