diff --git a/Content.Client/Construction/UI/ConstructionMenuPresenter.cs b/Content.Client/Construction/UI/ConstructionMenuPresenter.cs index f3b023e60d..ba786f27ea 100644 --- a/Content.Client/Construction/UI/ConstructionMenuPresenter.cs +++ b/Content.Client/Construction/UI/ConstructionMenuPresenter.cs @@ -167,7 +167,7 @@ namespace Content.Client.Construction.UI continue; } - if (!string.IsNullOrEmpty(category) && category != Loc.GetString("construction-presenter-category-all")) + if (!string.IsNullOrEmpty(category) && category != Loc.GetString("construction-category-all")) { if (recipe.Category != category) continue; @@ -191,11 +191,11 @@ namespace Content.Client.Construction.UI var uniqueCategories = new HashSet(); // hard-coded to show all recipes - uniqueCategories.Add(Loc.GetString("construction-presenter-category-all")); + uniqueCategories.Add(Loc.GetString("construction-category-all")); foreach (var prototype in _prototypeManager.EnumeratePrototypes()) { - var category = Loc.GetString(prototype.Category); + var category = prototype.Category; if (!string.IsNullOrEmpty(category)) uniqueCategories.Add(category); diff --git a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs index 8418595091..bea7dc3074 100644 --- a/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs +++ b/Content.Shared/Construction/Prototypes/ConstructionPrototype.cs @@ -8,6 +8,8 @@ namespace Content.Shared.Construction.Prototypes [Prototype("construction")] public sealed class ConstructionPrototype : IPrototype { + private string _category = string.Empty; + [DataField("conditions")] private List _conditions = new(); /// @@ -52,7 +54,12 @@ namespace Content.Shared.Construction.Prototypes [DataField("canBuildInImpassable")] public bool CanBuildInImpassable { get; private set; } - [DataField("category")] public string Category { get; private set; } = string.Empty; + [DataField("category")] + public string Category + { + get => _category; + private set => _category = Loc.GetString(value); + } [DataField("objectType")] public ConstructionType Type { get; private set; } = ConstructionType.Structure; diff --git a/Resources/Locale/en-US/construction/construction-categories.ftl b/Resources/Locale/en-US/construction/construction-categories.ftl index 336f3e0b19..8eeec00e68 100644 --- a/Resources/Locale/en-US/construction/construction-categories.ftl +++ b/Resources/Locale/en-US/construction/construction-categories.ftl @@ -1,4 +1,5 @@ -construction-category-furniture = Furniture +construction-category-all = All +construction-category-furniture = Furniture construction-category-storage = Storage construction-category-tools = Tools construction-category-materials = Materials diff --git a/Resources/Locale/en-US/construction/ui/construction-menu-presenter.ftl b/Resources/Locale/en-US/construction/ui/construction-menu-presenter.ftl index 0684638ca3..2ffd9ad975 100644 --- a/Resources/Locale/en-US/construction/ui/construction-menu-presenter.ftl +++ b/Resources/Locale/en-US/construction/ui/construction-menu-presenter.ftl @@ -1,5 +1,4 @@ -construction-presenter-category-all = All -construction-presenter-to-craft = To craft this item, you need to: +construction-presenter-to-craft = To craft this item, you need to: construction-presenter-to-build = To build this, first you need to: construction-presenter-step-wrapper = {$step-number}. {$text} diff --git a/Resources/Prototypes/Recipes/Construction/utilities.yml b/Resources/Prototypes/Recipes/Construction/utilities.yml index bd7c744a34..13d8a0411a 100644 --- a/Resources/Prototypes/Recipes/Construction/utilities.yml +++ b/Resources/Prototypes/Recipes/Construction/utilities.yml @@ -142,7 +142,7 @@ graph: DisposalMachine startNode: start targetNode: mailing_unit - category: Utilities + category: construction-category-utilities placementMode: SnapgridCenter canBuildInImpassable: false icon: diff --git a/Resources/Prototypes/Recipes/Crafting/improvised.yml b/Resources/Prototypes/Recipes/Crafting/improvised.yml index e146e21a0f..3e16cee20f 100644 --- a/Resources/Prototypes/Recipes/Crafting/improvised.yml +++ b/Resources/Prototypes/Recipes/Crafting/improvised.yml @@ -67,7 +67,7 @@ graph: flowercrown startNode: start targetNode: flowercrown - category: Misc + category: construction-category-misc description: "A coronet of fresh and fragrant flowers." icon: sprite: Clothing/Head/Misc/flower-crown.rsi