From 53167ad7742070c8dabc26e7fdc8beae507748a9 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 7 Jul 2008 20:14:20 +0000 Subject: changed function naming to be consistent with the rest of the script API and improved commenting. --- data/scripts/libtmw.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'data/scripts/libtmw.lua') diff --git a/data/scripts/libtmw.lua b/data/scripts/libtmw.lua index 83e3b40..26fb4ed 100644 --- a/data/scripts/libtmw.lua +++ b/data/scripts/libtmw.lua @@ -325,15 +325,19 @@ end -- DEATH NOTIFICATIONS local ondeath_functs = {} -function onDeath(being, funct) +-- requests the gameserver to notify the script engine when the being +-- dies and adds a script function to be executed in this case. +function on_death(being, funct) if ondeath_functs[being] == nil then ondeath_functs[being] = {} end table.insert(ondeath_functs[being], funct) - tmw.noteOnDeath(being) + tmw.note_on_death(being) end -function deathNotification(being) +-- called by the engine when a being with dies for which a death +-- notification has been requested +function death_notification(being) if type(ondeath_functs[being]) == "table" then for i,funct in pairs(ondeath_functs[being]) do funct() -- cgit