Scripting:Sourcecode
The source code for TWScript, including supporting files and instructions for building the scripts is available at GitHub: https://github.com/TheWatcher/twscript If you fork the code on GitHub and make any useful additions to any of the base/
files, or fix any bugs in the code, please send me a pull request and I'll look into merging your changes.
Layout
The TWScript source is organised into a number of directories:
base/
contains the various TWBase* base scripts and supporting code.pubscript/
contains any pieces of Telliamed's Public Scripts code required to support the rest of TWScripttwscript/
contains the implementations of the various TWScript scripts.
If you intend to use TWScript as a basis for your own code, you will need to retain the base
and pubscript
directories, but you will want to replace twscript
with your own code.
Code Style
The most immediate thing you will notice when browsing the TWScript code is that, unlike the wider lg/scriptlib/publicscript code by Telliamed, this code deliberately avoids Hungarian Notation as much as possible. If you want, consider it a way of clearly separating the TWScript code from the larger codebase (or maybe I just utterly loathe Hungarian Notation with the burning passion of a thousand newborn stars. Which is it? WE MAY NEVER KNOW!)
My code also uses underscores rather than CamelCase except for class names, and functions imported from outside my code. This is partly another personal style thing, but in this case there really is the intention of marking code separation: it makes it easier for me to keep track of what's mine and what comes from Outside.
|
|