Skip to content

Companion: the clothes in the app (#8) - #26

Merged
cmena92 merged 1 commit into
mainfrom
feat/8-ropa
Oct 29, 2026
Merged

cmena92 merged 1 commit into
mainfrom
feat/8-ropa

Conversation

@cmena92

@cmena92 cmena92 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Closes #8

What is here

  • One source for dressing the companion. The logic of componer (Arte de las siete prendas sobre los cuerpos #16) moves to www/games/companero/prendas.js, used by the browser and by design/companero/prendas.mjs. Proof that nothing changed: the Chrome check still prints 56 combinaciones, 0 superposiciones and the preview's SHA-256 is the same before and after. New: an unknown garment is skipped instead of breaking the animal.
  • exportar.mjs brings the garments, the catalogue and the anchors to arte.js.
  • The clothes region is visible: head, neck and body, each with a «None» card. Every card draws the companion as it would look with that garment in its slot.
  • The design first, the clothes after, so a design never recolours a garment.
  • Garments are bought through the same tocar as animals and designs (Diseños exclusivos de color para el compañero #7). The outfit stays when the animal changes.
  • Every card (animals and designs too) now tells a screen reader its name and its price, or that it is yours and in use.
  • Garment and slot names in the five languages; prendas.js added to the entry's files.

Checks run locally

  • node tools/test-companero.js: 103 green. New: arte.js carries the same clothes data as design/companero/; the app dresses the 56 pairs exactly as the art Chrome measures; an unknown garment is skipped. In a browser: the three slots, the seven garments and three «None» cards, a price in the screen-reader label, buying the bow (500 → 420) and wearing it, the crown replacing the cap with the bow still on (→ 110), «None» on the head, wearing an owned cap again with no charge or question, «in use» in its label, the outfit kept on the capybara and after a reload.
  • node tools/test.js: 5,482 green · ./tools/browser-check.sh: 50 of 50.
  • Screenshots of four species with outfits across the three slots, and the clothes region, checked by the owner's agent.

The logic that dresses the companion moves from the Node design script to
www/games/companero/prendas.js, one source for the browser and for
design/companero/prendas.mjs, whose Chrome check of the 56 pairs still
passes; the preview is byte for byte the same. An unknown garment is now
skipped instead of breaking the animal. exportar.mjs brings the
garments, the catalogue and the anchors to arte.js.

The clothes region is visible, with the three slots and a «None» card in
each. Every card draws the companion as it would look with that garment
in its slot; the design is applied first and the clothes after, so a
design never recolours a garment. Garments are bought through the same
function as animals and designs, the outfit stays when the animal
changes, and every card (animals and designs too) tells a screen reader
its name and its price, or that it is yours and in use.
@cmena92
cmena92 merged commit b5f086b into main Oct 29, 2026
3 checks passed
@cmena92
cmena92 deleted the feat/8-ropa branch October 29, 2026 05:42
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.

Agregar ropa y accesorios al compañero

1 participant