Day 26

by thengrad on Fri 05 July 2013 // Posted in legacy // under

With a little bit of work and fixing small typos I have now added a way for recipe to be selected in game. What I did was adapt the old way of doing the profit mini-game and put it at the end of the current end of the day log script. The way it works is that LemonadeGui stores two arrays. One is an array of the array of keys for each option. The other is an array of the current index number for each array of keys. Then event handler would increment the index number using which mode the game was in as the current matching index of both arrays. What I had to do was add the recipe options to the array of array of keys, add a way to visually display which recipe was selected and then, and then have it so that when the event handler would handle the key pressed of enter on the end of the day mode it would then store the recipe selected by the current index of the key for the dictionary to the property in LemonadeMain. After that I added more recipes for verity.