Skip to content

docs(design): soldier weapon/shield loadout — type vs instance split#540

Merged
d-morrison merged 3 commits into
mainfrom
docs/soldier-loadout-design-535
Jul 2, 2026
Merged

docs(design): soldier weapon/shield loadout — type vs instance split#540
d-morrison merged 3 commits into
mainfrom
docs/soldier-loadout-design-535

Conversation

@dem-extra1

Copy link
Copy Markdown
Collaborator

Summary

Consolidates #535's directive ("model soldier weapons/shields as concrete
classed objects") into a committed design doc, resolving the tension against
the existing SoA per-soldier arrays on Unit:

Phase issues filed and linked as sub-issues of #535: #536, #537, #538, #539.

Closes nothing yet — #535 stays open as the umbrella tracking issue until all
phases land.

Docs only, no code changes. demos/demo.535.json opts out of the gameplay
clip (nothing to record).

Test plan

…535)

Consolidates #535's directive into a committed design doc: Weapon/Shield
become concrete, interned TYPE classes (shared, one per type), while each
soldier references its active loadout by id through new parallel
_sim_soldier_weapon_id/_sim_soldier_shield_id arrays, mirroring the existing
SoA per-soldier state on Unit. Lays out a four-phase plan (type registry ->
shield hold-state -> rendering -> weapon-switching gameplay) and how it
relates to #516's orders-queue design and #530's formation geometry.

No code changes -- design only. Phase issues: #536, #537, #538, #539.
@dem-extra1 dem-extra1 added the work in progress PR is actively being worked on; not yet ready for review (kept in draft) label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🎬 Gameplay demo

🚫 No gameplay clip for this PR — docs-only design note (docs/soldier-loadout-design.md) -- no code changes, nothing to record.

The author marked this change as not demonstrable by a recorded battle ("skip": true in demos/demo.535.json); see demos/README.md.

@dem-extra1 dem-extra1 removed the work in progress PR is actively being worked on; not yet ready for review (kept in draft) label Jul 1, 2026
@dem-extra1 dem-extra1 marked this pull request as ready for review July 1, 2026 21:54
@claude

This comment has been minimized.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread docs/soldier-loadout-design.md Outdated
Comment thread docs/soldier-loadout-design.md Outdated
Comment thread docs/soldier-loadout-design.md Outdated
Comment thread docs/soldier-loadout-design.md Outdated
- Byte-count claim was mis-attributed to CLAUDE.md; replace with a derivation
  from Unit.gd's actual _sim_* array declarations (4 PackedVector2Array @ 8B +
  3 PackedFloat32Array @ 4B = 44B), explicitly noting it's not a CLAUDE.md
  citation.
- Fix Archers/Cavalry SHIELD_NONE contradiction -- only Archers carry
  SHIELD_NONE; Cavalry carry SHIELD_ROUND per the registry table.
- Drop the fictional Terrain class from the Weapon.effective_reach sketch;
  reference the real mechanism (PathField.active.speed_at(), Unit.gd:884)
  instead.
- Re-verified every other cited symbol against the code while in there:
  corrected _spawn_unit's owner (Battle.gd, not Unit.gd), grounded the
  shield-weight gradient in SoldierCombat.profile_for()'s real per-type
  values, fixed the archer weapon table entry (0.6m reach_m is the melee
  sidearm, not the bow -- ranged attacks use a separate RANGED_RANGE
  constant), clarified Shield.covers() is an illustrative simplification of
  today's continuous facing_gate()/land_chance() defence math, corrected the
  nonexistent Combat.gd autoload reference, and updated PR #534's now-current
  (non-draft) state.
@claude

This comment has been minimized.

@dem-extra1

Copy link
Copy Markdown
Collaborator Author

Working on this --- paws off until I'm done.

@claude

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown

Claude finished @dem-extra1's task in 37s —— View job


Review complete

  • Gather context (diff since last review, latest commit)
  • Confirm whether docs/soldier-loadout-design.md / demos/demo.535.json changed since the last review
  • Post final findings

What changed since the last review

The only new commit on this branch since the prior confirming review (d65da2e) is 946d006, a merge of origin/main into this branch. I checked it directly:

git diff d65da2e...HEAD -- docs/soldier-loadout-design.md demos/demo.535.json

produces no output — neither of this PR's two files changed. The merge only brought in unrelated content from main (benchmark tooling, docs/orders-queue-design.md, PLAN.md updates, new workflow files, etc.) via fast-forward of other merged PRs; none of it touches this PR's diff, which remains exactly demos/demo.535.json (+4) and docs/soldier-loadout-design.md (+279).

Verdict

All three findings from the original review were fixed in d65da2e and reconfirmed in the prior confirming review (byte-count citation, Cavalry shield contradiction, fictional Terrain class). Since neither file changed in the merge commit that triggered this run, that verdict still stands — no new findings.

Ready for merge.

@dem-extra1

Copy link
Copy Markdown
Collaborator Author

PR is fully clean and ready to merge: latest review (run 28566294851) has zero findings and says "Ready for merge"; all CI checks green including Coverage and codecov/patch; all inline review threads resolved; branch is synced with main (merge commit 946d006). Releasing my claim.

@d-morrison d-morrison merged commit 1e63420 into main Jul 2, 2026
9 checks passed
@d-morrison d-morrison deleted the docs/soldier-loadout-design-535 branch July 2, 2026 05:09
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