From ce1f1e5e15ffcc044fe7acb95dd0184e7d7628f4 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 2 Jan 2025 20:33:48 -0600 Subject: [PATCH] hacky debugging statements --- C7/C7.csproj | 4 ++-- C7/UIElements/UnitButtons/UnitButtons.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/C7/C7.csproj b/C7/C7.csproj index 1c36ff51..92fb0348 100644 --- a/C7/C7.csproj +++ b/C7/C7.csproj @@ -1,4 +1,4 @@ - + net7.0 true @@ -19,4 +19,4 @@ - + \ No newline at end of file diff --git a/C7/UIElements/UnitButtons/UnitButtons.cs b/C7/UIElements/UnitButtons/UnitButtons.cs index 19a3ed92..f2452108 100644 --- a/C7/UIElements/UnitButtons/UnitButtons.cs +++ b/C7/UIElements/UnitButtons/UnitButtons.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using C7GameData; using Serilog; +using System; /* UnitButtons contains the buttons at the bottom of the game UI when viewing the @@ -86,8 +87,10 @@ private void OnNoMoreAutoselectableUnits() { } private void OnNewUnitSelected(ParameterWrapper wrappedMapUnit) { + Console.WriteLine("Here!: OnNewUnitSelected " + buttonMap.Count); MapUnit unit = wrappedMapUnit.Value; foreach (UnitControlButton button in buttonMap.Values) { + Console.WriteLine("Here!: OnNewUnitSelected " + button.action); button.Visible = false; } @@ -96,6 +99,7 @@ private void OnNewUnitSelected(ParameterWrapper wrappedMapUnit) { // so that we don't display buttons that do nothing - we don't want to // show the "road" button if we can't build a road, etc. foreach (string action in unit.availableActions) { + Console.WriteLine("Available action: " + action); if (buttonMap.ContainsKey(action)) { buttonMap[action].Visible = true; } else {