Localize broken handcuffs (#11558)

This commit is contained in:
Morb
2022-09-27 19:26:03 +03:00
committed by GitHub
parent f459e69a9b
commit 2a80597118
3 changed files with 21 additions and 6 deletions

View File

@@ -19,6 +19,9 @@ namespace Content.Server.Cuffs.Components
{
[Dependency] private readonly IEntityManager _entities = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
private string _brokenName = string.Empty;
private string _brokenDesc = string.Empty;
/// <summary>
/// The time it takes to apply a <see cref="CuffedComponent"/> to an entity.
@@ -81,14 +84,22 @@ namespace Content.Server.Cuffs.Components
/// </summary>
[ViewVariables]
[DataField("brokenName")]
public string BrokenName { get; set; } = default!;
public string BrokenName
{
get => _brokenName;
private set => _brokenName = Loc.GetString(value);
}
/// <summary>
/// The iconstate used for broken handcuffs
/// </summary>
[ViewVariables]
[DataField("brokenDesc")]
public string BrokenDesc { get; set; } = default!;
public string BrokenDesc
{
get => _brokenDesc;
private set => _brokenDesc = Loc.GetString(value);
}
[ViewVariables]
public bool Broken