Skip to content

Companion: the exclusive colour designs in the app (#7) - #25

Merged
cmena92 merged 1 commit into
mainfrom
feat/7-disenos
Oct 29, 2026
Merged

cmena92 merged 1 commit into
mainfrom
feat/7-disenos

Conversation

@cmena92

@cmena92 cmena92 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Closes #7

What is here

  • One source for the designs. The logic of aplicar (Arte de los diseños exclusivos de color #17) moves to www/games/companero/disenos.js, plain string work with no file access. The browser and design/companero/disenos.mjs both use it. Proof that nothing changed: the 48 outputs in design/companero/disenos/ and the preview are byte for byte the same, and the design check still prints 48 combinaciones, contraste mínimo 3.55:1.
  • exportar.mjs brings the designs and each animal's natural colours into arte.js.
  • The colours region is visible: the six designs drawn on the animal being worn, so the player sees exactly what they buy. Natural is included; the others show their price and use the same confirmation as the animals.
  • One tocar function for anything the companion sells (animals now, designs, and garments in Agregar ropa y accesorios al compañero #8).
  • The big companion wears its design, which stays when the animal changes. The menu palette is never touched.
  • Design names in the five languages; disenos.js added to the entry's files for offline use.

Checks run locally

  • node tools/test-companero.js: 88 green. New: arte.js matches disenos.json and anclajes.json; the app's disenos.js draws the 48 pairs identical to the approved ones; an unknown design falls back to Natural. In a browser: the six designs, Natural owned and worn, Midnight's price, buying it once (300 → 180) and seeing it on the companion, keeping it when switching to the capybara, after a reload, no charge when tapping an owned design, the menu palette unchanged, and no purchase without enough coins.
  • node tools/test.js: 5,482 green · ./tools/browser-check.sh: 50 of 50.
  • Screenshots in the light theme (capybara in Spots) and the dark theme (golden panda), checked by the owner's agent.

The logic that applies a design moves from the Node design script to
www/games/companero/disenos.js, one source for the browser and for
design/companero/disenos.mjs. Its 48 checks still pass and its output is
byte for byte the same. exportar.mjs brings the designs and each
animal's natural colours to arte.js.

The colours region is now visible: the six designs, drawn on the animal
being worn, so the player sees exactly what they buy. Natural is
included; the others show their price and are bought with the same
confirmation as the animals, through one shared function for anything
the companion sells. The big companion wears its design, which stays
when the animal changes. The menu palette is never touched.

tools/test-companero.js checks the single source (the app draws the 48
pairs identical to the approved ones, and an unknown design falls back
to Natural) and drives the purchase in a browser.
@cmena92
cmena92 merged commit f9f4086 into main Oct 29, 2026
3 checks passed
@cmena92
cmena92 deleted the feat/7-disenos branch October 29, 2026 05:30
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.

Diseños exclusivos de color para el compañero

1 participant