mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +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]? --> Require #459 Add 3 optional settings for LanguagePrototypes to play with richtext tags to they could be reconized as Makings color - Set a specefic color to the text. fontId - Set a font to the text by using the Id. fontSize - Set the size of the text All 3 are optional if not set message will be handeled like normal. This should be mostly used to know what language your currently speaking and assist with markings. Take note those changes happent only in the TextBox chat, bubblechat is left unchanged. --- # TODO <!-- A list of everything you have to do before this PR is "complete" You probably won't have to complete everything before merging but it's good to leave future references --> - [x] Add Markings - [x] Add Fonts --- <!-- 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: Languages are now marked in the chat! --------- Signed-off-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Signed-off-by: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com> Co-authored-by: fox <daytimer253@gmail.com> Co-authored-by: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com>
38 lines
1022 B
C#
38 lines
1022 B
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>
|
|
/// 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
|
|
}
|