diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-02-28 23:37:23 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-02 18:12:20 +0100 |
commit | ba5b55f3eba0aa3898c5fe42de9838b22473c24a (patch) | |
tree | 465e70d3bc4671b75f1af763d866eafa459f5d6f /src/scripting/scriptmanager.h | |
parent | 05bb880a3b0ebe401bac83b7a2400aa315161f9c (diff) | |
download | manaserv-ba5b55f3eba0aa3898c5fe42de9838b22473c24a.tar.gz manaserv-ba5b55f3eba0aa3898c5fe42de9838b22473c24a.tar.bz2 manaserv-ba5b55f3eba0aa3898c5fe42de9838b22473c24a.tar.xz manaserv-ba5b55f3eba0aa3898c5fe42de9838b22473c24a.zip |
Use callbacks for handling character death and respawn
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
Diffstat (limited to 'src/scripting/scriptmanager.h')
-rw-r--r-- | src/scripting/scriptmanager.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/scripting/scriptmanager.h b/src/scripting/scriptmanager.h index 7560c343..ade76c19 100644 --- a/src/scripting/scriptmanager.h +++ b/src/scripting/scriptmanager.h @@ -56,11 +56,6 @@ bool loadMainScript(const std::string &file); */ Script *currentState(); - -/** - * Runs a global function from the global event script file - */ -bool executeGlobalEventFunction(const std::string &function, Being *obj); void addDataToSpecial(int specialId, Special *special); bool performSpecialAction(int specialId, Being *caster); bool performCraft(Being *crafter, const std::list<InventoryItem> &recipe); |