Closed StLoch closed 14 years ago
Yeah, it would be nice to be able to get at the ruby scripts during world generation, for example. I like the state idea, it seems reasonable.
I'm thinking we should have the ruby console execute its code in whatever state it was pushed on top of. For example, if the console is opened in the MainMenuState, you'll be working in the MainMenuState's scope. If you were in GameState, it's executed in GameState, etc... Means the console will act differently in different places, but whatever.
Sounds like we need to swap out the proc in the console whenever we change states. That should be easy enough; we'll just need to create a method in Console to set the eval proc after object creation, as that's where it's specified currently.
I'd say this is done.
We need to decide if the console should be available everywhere or just in the game. If it's the former, it should definitely have its own state that can be pushed and popped at will. If it's the latter then, then we can go the state route again OR we can have it be another object (next to UIManager, World, etc...) in the game state that is deferred input by the EventTranslator. The state solution is probably the best, though.