mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 21:48:58 +03:00
<!-- This is a semi-strict format, you can add/remove sections as needed but the order/format should be kept the same Remove these comments before submitting --> # Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> Gives a new way to speak, Sign Languages using the Language system by only adding a nullable variable. Sign Language uses the default Emote system, meaning its will not get picked up by Radio or others devices or get blocked by accents. When a Sign Language is on, "Say/Whisper" will talk in Sign Language, Emote will still act like normal emotes. The Glorious Sign Language has arrived... and there can be more then one! --- <!-- This is default collapsed, readers click to expand it and see all your media The PR media section can get very large at times, so this is a good way to keep it clean The title is written using HTML tags The title must be within the <summary> tags or you won't see it --> <details><summary><h1>Media</h1></summary> <p>   </p> </details> --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 FoxxoTrystan - add: Added the ability to speak with Sign Language.
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Language;
|
|
|
|
[Prototype("language")]
|
|
public sealed class LanguagePrototype : IPrototype
|
|
{
|
|
[IdDataField]
|
|
public string ID { get; private set; } = default!;
|
|
|
|
[DataField("color")]
|
|
public Color? Color;
|
|
|
|
[DataField("fontId")]
|
|
public string? FontId;
|
|
|
|
[DataField("fontSize")]
|
|
public int? FontSize;
|
|
|
|
/// <summary>
|
|
/// If true, will mark the language as a SignLanguage and will be handled as such.
|
|
/// </summary>
|
|
[DataField("signLanguage")]
|
|
public bool? SignLanguage;
|
|
|
|
/// <summary>
|
|
/// Obfuscation method used by this language. By default, uses <see cref="ObfuscationMethod.Default"/>
|
|
/// </summary>
|
|
[DataField("obfuscation")]
|
|
public ObfuscationMethod Obfuscation = ObfuscationMethod.Default;
|
|
|
|
#region utility
|
|
/// <summary>
|
|
/// The in-world name of this language, localized.
|
|
/// </summary>
|
|
public string Name => Loc.GetString($"language-{ID}-name");
|
|
|
|
/// <summary>
|
|
/// The in-world description of this language, localized.
|
|
/// </summary>
|
|
public string Description => Loc.GetString($"language-{ID}-description");
|
|
#endregion utility
|
|
}
|