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

View File

@@ -0,0 +1,4 @@
handcuff-broken-cables-name = broken cables
handcuff-broken-cables-desc = These cables are broken in several places and don't seem very useful.
handcuff-broken-zipties-name = broken zipties
handcuff-broken-zipties-desc = These zipties look like they tried to manage the wrong cables.

View File

@@ -31,8 +31,8 @@
color: red
breakOnRemove: true
brokenIconState: cuff-broken
brokenName: broken cables
brokenDesc: These cables are broken in several places and don't seem very useful.
brokenName: handcuff-broken-cables-name
brokenDesc: handcuff-broken-cables-desc
startCuffSound:
path: /Audio/Items/Handcuffs/rope_start.ogg
endCuffSound:
@@ -65,8 +65,8 @@
bodyIconState: body-overlay
breakOnRemove: true
brokenIconState: cuff-broken
brokenName: broken zipties
brokenDesc: These zipties look like they tried to manage the wrong cables.
brokenName: handcuff-broken-zipties-name
brokenDesc: handcuff-broken-zipties-desc
startCuffSound:
path: /Audio/Items/Handcuffs/ziptie_start.ogg
endCuffSound: