Monday, May 30, 2011
Back to the tester
So after re-writing items almost completely I began re-writing them again. The version I was working with was a simple array of item name's as strings. This worked really well but for one thing that doesn't give quantity. The big advantage was array.push(item_name); and that was the entire code.
But as has been a gripe for a while is milk creating tons of milk and I needed to figure out a way to also to have ammo. So I changed the simple array of strings to an array of classes. The advantage of that is obvious you can have more then one property in a nice set up for arrays. You lose the easy push though and have to use a constructor. Oh well. On the other hand you know who has made an item and feed your milk cow her own milk if your a pervert... like me.
The actual stacking mechanic is still not working as it requires a pop up, which is proving to be interesting work as a class. But I'm working on it. Though tonight is officially a lazy day... we shall see though.