Compare commits

...
Author SHA1 Message Date
adminandClaude Opus 4.5 8c8562495b Fix flashing borders not clearing after unit placement in Shardok
Two issues fixed:

1. PerformPlacementAction() was missing overlay cleanup after placing a unit.
   Added hexGrid.ClearOverlays() and HandleEnemyStartingPositionOverlays().

2. SelectedReserveUnitChangedTo() didn't clear board selection when switching
   from a board unit to a reserve unit. Now clears _selectedGridIndex and
   overlays before drawing new placement options.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 23:05:24 -08:00
@@ -2157,6 +2157,10 @@ namespace Shardok {
throw new ArgumentException("either reserve unit or start index must be set");
Model.PerformPlaceOrHideCommand(unit, GridIndexToMapCoords(finishGridIndex));
// Clear flashing borders after placement (same cleanup as PerformAction)
hexGrid.ClearOverlays();
HandleEnemyStartingPositionOverlays();
}
public void HandleHover(int gridIndex) {
@@ -2202,6 +2206,10 @@ namespace Shardok {
public void SelectedReserveUnitChangedTo(UnitViewWithName unit) {
if (unit != null) {
// Clear any board unit selection when selecting a reserve unit
_selectedGridIndex = null;
hexGrid.ClearOverlays();
var cmdGroup = commandTypeUIManager.CommandGroupForType(
Model.InSetUp ? CommandType.PlaceUnitCommand
: CommandType.ReinforceCommand);
@@ -2209,6 +2217,8 @@ namespace Shardok {
RedrawCommandOverlays(null, null);
} else {
SetDisplayedCommandGroup(0);
hexGrid.ClearOverlays();
HandleEnemyStartingPositionOverlays();
}
}