WetCon(sole|fig) is my Console and Config system, its just an lua host for choosing settings and generally controlling junk.The file data/config/startup.lua is executed on startup, to initialise settings. This file is dumped out on exit so changes are not 100% guaranteed to remain. It's better to changing the live settings and letting the main code modify it. (this doesn't work yet) Pressing ` will bring down a console from the top of the screen to allow you to issue commands during runtime. ` is the key above tab and is called a tilde. It is the standard key to activate consoles since the dawn of quake. Please see http://www.lua.org/manual/5.0/manual.html for an overview of the lua language. More lua information exists both on the official site http://www.lua.org and on other resources such as http://lua-users.org/wiki/ In console mode a (); is added to the end of words typed alone. This turns single words into function calls with standard lua syntax and saves you having to press any twiddly keys for most options. At the moment the lua is slightly unsafe in that you can sit in a while loop for ever without returning, I need to add some handler logic to prevent this, for now don't blame me if you break it. It's possible to cooperatively multi task using standard lua yield functions. An lua task started via the console can live indefinably this way getting up to all sorts of mischief every frame. In general if you have chosen to mess with the console you must take responsibility for your own actions. You tamper, you break, your problem, them's the rules :) The more dangerous file IO commands have been removed but apart from that you have all the standard lua calls available. WetLua lists my lua extensions and important vars, these can all be used via the console but some don't make sense in an initial config file. The reason for this is that the config file is processed prior to setting up much of the internal environment. Console Control Keys
|
Copyright (c) 2006-2008 www.WetGenes.com (Kriss + Shi Daniels) All Rights Reserved. Where there is no Enape from teh Klowns!