Repository navigation
Companion: the exclusive colour designs in the app (#7) - #25
Merged
Merged
Conversation
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.
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 #7
What is here
aplicar(Arte de los diseños exclusivos de color #17) moves towww/games/companero/disenos.js, plain string work with no file access. The browser anddesign/companero/disenos.mjsboth use it. Proof that nothing changed: the 48 outputs indesign/companero/disenos/and the preview are byte for byte the same, and the design check still prints48 combinaciones, contraste mínimo 3.55:1.exportar.mjsbrings the designs and each animal's natural colours intoarte.js.tocarfunction for anything the companion sells (animals now, designs, and garments in Agregar ropa y accesorios al compañero #8).disenos.jsadded to the entry'sfilesfor offline use.Checks run locally
node tools/test-companero.js: 88 green. New:arte.jsmatchesdisenos.jsonandanclajes.json; the app'sdisenos.jsdraws 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.