Fixes construction menu from throwing exceptions after round start.

This commit is contained in:
Acruid
2021-02-22 01:11:05 -08:00
parent 1db8f9908d
commit 02a60a2756

View File

@@ -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;
}
/// <inheritdoc />
@@ -121,6 +126,8 @@ namespace Content.Client.Construction
_systemManager.SystemUnloaded -= OnSystemUnloaded;
_placementManager.PlacementChanged -= OnPlacementChanged;
_gameHud.CraftingButtonToggled -= OnHudCraftingButtonToggled;
}
private void OnPlacementChanged(object? sender, EventArgs e)