diff --git a/Content.Server/Storage/Components/SecretStashComponent.cs b/Content.Server/Storage/Components/SecretStashComponent.cs index ca1a382c17..5876ab1adc 100644 --- a/Content.Server/Storage/Components/SecretStashComponent.cs +++ b/Content.Server/Storage/Components/SecretStashComponent.cs @@ -15,6 +15,8 @@ namespace Content.Server.Storage.Components [Access(typeof(SecretStashSystem))] public sealed class SecretStashComponent : Component { + private string _secretPartName = string.Empty; + /// /// Max item size that can be fitted into secret stash. /// @@ -26,7 +28,11 @@ namespace Content.Server.Storage.Components /// If empty string, will replace it with entity name in init. /// [ViewVariables] [DataField("secretPartName")] - public string SecretPartName = ""; + public string SecretPartName + { + get => _secretPartName; + set => _secretPartName = Loc.GetString(value); + } /// /// Container used to keep secret stash item. diff --git a/Content.Server/Storage/EntitySystems/SecretStashSystem.cs b/Content.Server/Storage/EntitySystems/SecretStashSystem.cs index cc82436683..b1cf5007bf 100644 --- a/Content.Server/Storage/EntitySystems/SecretStashSystem.cs +++ b/Content.Server/Storage/EntitySystems/SecretStashSystem.cs @@ -25,7 +25,7 @@ namespace Content.Server.Storage.EntitySystems private void OnInit(EntityUid uid, SecretStashComponent component, ComponentInit args) { // set default secret part name - if (component.SecretPartName == "") + if (component.SecretPartName == string.Empty) { var meta = EntityManager.GetComponent(uid); var entityName = Loc.GetString("comp-secret-stash-secret-part-name", ("name", meta.EntityName)); diff --git a/Resources/Locale/en-US/storage/components/secret-stash-component.ftl b/Resources/Locale/en-US/storage/components/secret-stash-component.ftl index 6695088251..1d3fe38c69 100644 --- a/Resources/Locale/en-US/storage/components/secret-stash-component.ftl +++ b/Resources/Locale/en-US/storage/components/secret-stash-component.ftl @@ -5,3 +5,6 @@ comp-secret-stash-action-hide-success = You hide {$item} in { $this } comp-secret-stash-action-hide-container-not-empty = There's already something in here?! comp-secret-stash-action-hide-item-too-big = {$item} is too big to fit in {$stash}! comp-secret-stash-action-get-item-found-something = There was something inside {$stash}! + +secret-stash-part-plant = the plant +secret-stash-part-toilet = the toilet cistern \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml index dbcdf501be..96dfdb2fb4 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml @@ -25,7 +25,7 @@ noRot: true - type: PottedPlantHide - type: SecretStash - secretPartName: the plant + secretPartName: secret-stash-part-plant - type: ContainerContainer containers: stash: !type:ContainerSlot {} diff --git a/Resources/Prototypes/Entities/Structures/Furniture/toilet.yml b/Resources/Prototypes/Entities/Structures/Furniture/toilet.yml index b906ce0557..598b1a99d8 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/toilet.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/toilet.yml @@ -17,7 +17,7 @@ netsync: false - type: Toilet - type: SecretStash - secretPartName: the toilet cistern + secretPartName: secret-stash-part-toilet - type: ContainerContainer containers: stash: !type:ContainerSlot {}