Skip to content

fix: resource trackers compied from template don't inherit max value#2783

Merged
mjeffw merged 1 commit into
mainfrom
bugfix/1796
Jul 15, 2026
Merged

fix: resource trackers compied from template don't inherit max value#2783
mjeffw merged 1 commit into
mainfrom
bugfix/1796

Conversation

@rinickolous

Copy link
Copy Markdown
Collaborator

fixes #1796

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an issue where applying/copying a resource tracker template could incorrectly overwrite the template’s configured max value (e.g., 99) with the tracker’s value (e.g., 0) when no initialValue is set.

Changes:

  • Adjusted tracker initialization so max is only derived from initialValue when initialValue is present.
  • Preserved template-provided max when initialValue is empty, while still initializing value appropriately for damage vs non-damage trackers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mjeffw
mjeffw merged commit 6720f8c into main Jul 15, 2026
1 check passed
@mjeffw
mjeffw deleted the bugfix/1796 branch July 15, 2026 17:17
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.

Max in resource tracker template not being copied to characters

3 participants