Skip to content

Unit Upgrades#94

Merged
1brucben merged 3 commits into
v0.2.0from
unitupgrades
Nov 17, 2025
Merged

Unit Upgrades#94
1brucben merged 3 commits into
v0.2.0from
unitupgrades

Conversation

@1brucben
Copy link
Copy Markdown
Owner

This pull request introduces a new feature that allows players to set default upgrade levels for combat units, similar to the existing structure upgrade settings. It removes the old "unit upgrade mode" logic and replaces it with a persistent, client-side modal for managing unit upgrade preferences. The build menu and underlying cost calculations are updated to respect these settings, and the UI now clearly displays the configured unit levels. The changes are grouped into feature additions, UI enhancements, and codebase cleanup.

Feature Additions:

  • Added UnitUpgradeSettingsModal (src/client/UnitUpgradeSettingsModal.ts), a persistent modal for configuring default upgrade levels for units. These settings are stored locally and capped per unit type.
  • Updated build cost calculations and build intent logic to support per-unit upgrade levels, using new settings from local storage. This affects both the build menu display and the transport logic for sending build intents. [1] [2] [3] [4] [5]
  • Added a button in the control panel to open the new unit upgrade settings modal, allowing users to easily configure their preferences. [1] [2]

UI Enhancements:

  • The build menu now visually displays the desired upgrade level for both structures and units using a new build-level-chip element, improving clarity for players. [1] [2] [3]
  • Updated UIState and renderer logic to track and use client-side unit levels for rendering and interaction. [1] [2] [3]

Codebase Cleanup:

  • Removed legacy "unit upgrade mode" logic and related event handlers, simplifying input and transport handling. [1] [2] [3] [4]
  • Deprecated the ToggleUnitUpgradeModeEvent file, marking it for removal.
  • Updated imports and ensured the new modal is registered and available at runtime. [1] [2] [3]

Let me know if you want a walkthrough of how the new modal works or how the build menu now calculates and displays unit upgrade levels!

@1brucben 1brucben merged commit 0356dd4 into v0.2.0 Nov 17, 2025
5 of 7 checks passed
@El-Magico777 El-Magico777 added this to the v0.1.11 milestone Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants