Closed Lia-C closed 9 years ago
Also is there a way to make a new tab in levels
, so that we have three tabs: Main, Remote, and MyLevels?
I figured out my first question: you can specify the number of commands right in the level's json: "solutionCommand": "git rebase dev; git commit"
. The number of commands you put here is what is used as the "best" number of commands.
Still trying to figure out how to create a new tab, though...
Figured out how to create a new tab! You add a new tab in src/js/views/levelDropdownView.js
. AFter making a level, you can add your level to your tab in src/levels/index.js
by putting tab: 'yourtabname'
in your level's part of the JSON.
Yep @Lia-C ! The tabs part is fairly mainly since we only have two tabs
For the solutionCommand stuff, we automatically record the commands you used to solve the level -- but if you have a more efficient solution, youll need to re-record the level or just edit the json manually
also notice that grunt test
should test the new level automatically!
I created a new level with the level builder, took the JSON, stored it in a
mylevel.js
file insrc/levels/mylevels
. I also added thismylevel.js
tosrc/levels/index.js
, so nowmylevel
appears in the modal when you typelevels
. However, when I test my level, after I complete it, I get the the modal that saysMylevel actually takes 2 commands, but where do I specify this? I know that in
src/js/dialogs/nextLevel.js
there is the line 'our solution uses {best}"-- but where do I specify{best}
for mylevel?