From 8fbcaf496a8948aca8c05d2a1e0d402318d21ff4 Mon Sep 17 00:00:00 2001 From: Ed Date: Fri, 25 Apr 2025 23:17:06 +0300 Subject: [PATCH] some bugfixes --- Content.Client/_CP14/Workbench/CP14WorkbenchWindow.xaml.cs | 4 +++- Resources/Prototypes/_CP14/Catalog/Fills/crates.yml | 1 + .../Prototypes/_CP14/Entities/Structures/Fence/big_gate.yml | 3 +++ Resources/Prototypes/_CP14/Entities/Structures/Fence/gate.yml | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Content.Client/_CP14/Workbench/CP14WorkbenchWindow.xaml.cs b/Content.Client/_CP14/Workbench/CP14WorkbenchWindow.xaml.cs index 6c373b0d7f..7ee52d2568 100644 --- a/Content.Client/_CP14/Workbench/CP14WorkbenchWindow.xaml.cs +++ b/Content.Client/_CP14/Workbench/CP14WorkbenchWindow.xaml.cs @@ -78,7 +78,8 @@ public sealed partial class CP14WorkbenchWindow : DefaultWindow CraftsContainer.AddChild(control); } - RecipeSelectNull(); + if (_selectedEntry is not null && !recipes.Contains(_selectedEntry.Value)) + RecipeSelectNull(); } public void UpdateState(CP14WorkbenchUiRecipesState recipesState) @@ -227,6 +228,7 @@ public sealed partial class CP14WorkbenchWindow : DefaultWindow private void RecipeSelectNull() { _selectedEntry = null; + ItemView.SetPrototype(null); ItemName.Text = string.Empty; ItemDescription.Text = string.Empty; diff --git a/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml b/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml index 4dd53f0ba7..4dcbb0dade 100644 --- a/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml +++ b/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml @@ -90,6 +90,7 @@ table: !type:GroupSelector children: - id: CP14FoodPotato + - id: CP14FoodOnion - id: CP14AgaricMushroom #dont eat - id: CP14Cloth10 - id: CP14CrayonWhite diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Fence/big_gate.yml b/Resources/Prototypes/_CP14/Entities/Structures/Fence/big_gate.yml index dfe8f626db..671cfcc5d4 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Fence/big_gate.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Fence/big_gate.yml @@ -43,6 +43,9 @@ params: variation: 0.03 volume: -5 + - type: Lock + locked: false + - type: CP14Lock #Empty, for installing new locks - type: entity parent: diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Fence/gate.yml b/Resources/Prototypes/_CP14/Entities/Structures/Fence/gate.yml index ad1302dbcd..4194c790c5 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Fence/gate.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Fence/gate.yml @@ -43,6 +43,9 @@ params: variation: 0.03 volume: -5 + - type: Lock + locked: false + - type: CP14Lock #Empty, for installing new locks - type: entity parent: