Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2012-03-03 | Added further missing callbacks | Erik Schilling | 1 | -4/+28 | |
Reviewed-by: bjorn. | |||||
2012-03-02 | Use callbacks for handling character death and respawn | Thorbjørn Lindeijer | 1 | -13/+0 | |
Rather than relying on the availability of global functions with certain predefined names, the Lua script now calls API functions to set which function should be called on these global events. This mechanism should make it easier to avoid name collisions in the global namespace, which is important now that there is only a single script state. For these global events this was not likely to become a problem, but this solution can also be used for callbacks on specific item or monster types, or even allow setting callbacks on certain instances. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira | |||||
2012-03-02 | Merged all the different Lua states into one | Thorbjørn Lindeijer | 1 | -0/+98 | |
No more Lua state for each status effect, monster, item effect or map. All scripts are loaded into the same state. This should be more efficient overall and make it easier to implement dynamic reloading of the scripts in the future. Now, this introduces the problem of name collisions between different Lua scripts. For now this is solved by using more specific function names, like 'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however to get rid of these globals, and register these callbacks from the script, so that they can be local functions without the danger of colliding with other scripts. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira |