Repository navigation
Companion: the clothes in the app (#8) - #26
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
What is here
componer(Arte de las siete prendas sobre los cuerpos #16) moves towww/games/companero/prendas.js, used by the browser and bydesign/companero/prendas.mjs. Proof that nothing changed: the Chrome check still prints56 combinaciones, 0 superposicionesand the preview's SHA-256 is the same before and after. New: an unknown garment is skipped instead of breaking the animal.exportar.mjsbrings the garments, the catalogue and the anchors toarte.js.tocaras animals and designs (Diseños exclusivos de color para el compañero #7). The outfit stays when the animal changes.prendas.jsadded to the entry'sfiles.Checks run locally
node tools/test-companero.js: 103 green. New:arte.jscarries the same clothes data asdesign/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.