lua.wetgenes.gamecake.oven
oven=require("wetgenes.gamecake.oven").bake(opts)
The oven module must be baked so only exposes a bake function.
All the other functions are returned from within the bake function.
possible ENV settings
gamecake_tongue=english
gamecake_flavour=sdl
lua.wetgenes.gamecake.oven.bake
oven=wetgenes.gamecake.oven.bake(opts)
Bake creates an instance of a lua module bound to a state. Here we are creating the main state that other modules will then bind to.
We call each state an OVEN to fit into the gamecake naming scheme then we bake a module in this oven to bind them to the common state.
Think of it as a sub version of require, so require gets the global pointer for a module and bake is used to get the a module bound to an oven.
By using this bound state we reduce the verbosity of connecting modules and sharing state between them.