diff --git a/Content.Client/Construction/ConstructionMenuPresenter.cs b/Content.Client/Construction/ConstructionMenuPresenter.cs index efff7f3256..319e6eac62 100644 --- a/Content.Client/Construction/ConstructionMenuPresenter.cs +++ b/Content.Client/Construction/ConstructionMenuPresenter.cs @@ -109,7 +109,12 @@ namespace Content.Client.Construction PopulateCategories(); OnViewPopulateRecipes(_constructionView, (string.Empty, string.Empty)); - _gameHud.CraftingButtonToggled += b => WindowOpen = b; + _gameHud.CraftingButtonToggled += OnHudCraftingButtonToggled; + } + + private void OnHudCraftingButtonToggled(bool b) + { + WindowOpen = b; } /// @@ -121,6 +126,8 @@ namespace Content.Client.Construction _systemManager.SystemUnloaded -= OnSystemUnloaded; _placementManager.PlacementChanged -= OnPlacementChanged; + + _gameHud.CraftingButtonToggled -= OnHudCraftingButtonToggled; } private void OnPlacementChanged(object? sender, EventArgs e)