Skip to content

fix: render neutral/rebelled hexes on map#10

Merged
keanji-x merged 9 commits intomainfrom
fix/show-all-hexes
Apr 5, 2026
Merged

fix: render neutral/rebelled hexes on map#10
keanji-x merged 9 commits intomainfrom
fix/show-all-hexes

Conversation

@keanji-x
Copy link
Copy Markdown
Collaborator

@keanji-x keanji-x commented Apr 5, 2026

Summary

  • Neutral/rebelled hexes (ownerId=0) were rendering as black holes on the map
  • WorldLayout.ts only included owned hexes in the hexOwners map, skipping unowned ones entirely
  • HexMapScene.ts only rendered hexes present in hexOwners

Fix

  • Include all hexes in hexOwners map regardless of ownership
  • Owned hexes: colored overlay as before
  • Neutral hexes: dim gray outline so the full map is always visible

Test plan

  • Verify all 35 hexes render on Gravity testnet frontend
  • Neutral hexes show gray, owned hexes show team colors

🤖 Generated with Claude Code

keanji-x and others added 9 commits April 5, 2026 20:30
WorldLayout only included hexes with ownerId > 0 in the hexOwners map,
causing unowned hexes to render as black voids. Now all hexes are
included — owned hexes show colored overlays, neutral ones show a dim
gray outline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add namedAgents[owner][nameHash] mapping to AgentRegistry so the same
address cannot create two agents with the same name. create_agent MCP
tool is now idempotent — returns the existing agent if already created.

- AgentRegistry: add uniqueness check, getAgentByName view, cleanup on remove
- MCP chain/tools: findAgentByName + idempotent create_agent
- agent-runner: ensureAgent leverages idempotent create, logs reuse
- Fix stale tool descriptions (slots 12→6, cooldown 60s→5s, combat rewards)
- 2 new tests: duplicate revert + same-name-different-owner ok

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Router: 0x4968505A0F9C17e573adE046F39B0E9b91E79d11

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- AgentRegistry: add ownerAgentIds mapping, getAgentsByOwner view,
  cleanup on removeAgent
- MCP: add getAgentsByOwner chain method + get_my_agents tool
- Redeploy to Gravity Testnet with fresh state
  Router: 0x96EBC8b846795d19130e1Dd944B61Ab90696bA1a

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add get_my_agents tool to both docs
- Remove phantom claim_hex / get_claimable_hexes (not implemented)
- Fix expansion description: combat-only, no hex claiming
- Add idempotent agent creation note to skill.md
- Update happiness boost details in skill.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- llm.ts: remove claim_hex/get_claimable_hexes from selfTools (not implemented)
- state-storage.md: fix AgentRegistry schema (remove gold field, add
  namedAgents/ownerAgentIds), update operations, add GameEngine to
  Router diagram, replace gold references with ore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WorldLayout filtered out locations with ownerId=0, which hid agents
standing on rebelled hexes. Now all hex locations are included in the
layout regardless of ownership. Neutral hexes show "Neutral" as owner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@keanji-x keanji-x merged commit eb8d0e5 into main Apr 5, 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.

1 participant