Skip to content

Add economy integration for blueprint bundle costs#2806

Merged
tastybento merged 4 commits intodevelopfrom
feature/blueprint-bundle-cost
Mar 1, 2026
Merged

Add economy integration for blueprint bundle costs#2806
tastybento merged 4 commits intodevelopfrom
feature/blueprint-bundle-cost

Conversation

@tastybento
Copy link
Member

@tastybento tastybento commented Mar 1, 2026

Summary

  • Wire up the existing BlueprintBundle.cost field with full Vault economy support
  • Admin GUI: gold ingot cost editor at slot 41 (left/right click +/-1, shift +/-100)
  • Player creation panel: shows cost on bundle buttons when economy is enabled
  • Island create/reset commands: check affordability before creation, charge after success
  • Cost only applies when multiple bundles are available (single bundle = always free)
  • Reset charging gated by new config option charge-for-blueprint-on-reset (default: false)
  • All cost logic silently skipped when Vault/economy is not installed
  • New TextVariables.COST placeholder and locale entries for admin/player messaging

Test plan

  • ./gradlew build passes
  • All existing tests pass
  • 5 new tests for IslandCreateCommand (cannot afford, can afford, single bundle ignored, no economy ignored, no vault ignored)
  • 4 new tests for IslandResetCommand (cannot afford, can afford, disabled by config, no vault ignored)
  • Manual: create two blueprint bundles, set cost on one via admin GUI, verify player sees cost, verify CLI checks cost, verify money deducted on success

🤖 Generated with Claude Code

tastybento and others added 4 commits March 1, 2026 14:44
Wire up the existing BlueprintBundle cost field with full Vault economy
support: admin GUI editor, player-facing cost display, and automatic
charge/check on island creation and reset. Cost only applies when
multiple bundles are available. Reset charging is gated behind a new
config option (charge-for-blueprint-on-reset, default false). All cost
logic is silently skipped when Vault/economy is not installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Translate cost, no-cost, and cost-amount keys into all 22 non-English
locale files. Also update en-US to use [prefix_Island] placeholder
instead of hardcoded "Bundle".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Translate the remaining two locale entries to all 22 non-English files:
- commands.island.create.cannot-afford (player error message)
- panels.island_creation.buttons.bundle.cost (panel cost display)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract the common cost-checking logic from IslandCreateCommand and
IslandResetCommand into a package-private BlueprintCostHelper class
to eliminate code duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

@tastybento tastybento merged commit c3c2b4d into develop Mar 1, 2026
3 checks passed
@tastybento tastybento deleted the feature/blueprint-bundle-cost branch March 1, 2026 23:19
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.

1 participant