From c92f7bf932d6e36c1aecd704a2a69d742ef7748d Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Thu, 5 Apr 2012 20:55:25 +0200 Subject: Lua: Remove HOOK_GF_EXEC and HOOK_GF_COLOR --- lib/core/s_aux.lua | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'lib/core') diff --git a/lib/core/s_aux.lua b/lib/core/s_aux.lua index 29b22fd7..97643626 100644 --- a/lib/core/s_aux.lua +++ b/lib/core/s_aux.lua @@ -621,32 +621,3 @@ end function activate_activation(spl, item) __spell_spell[spl](item) end - - -------- Add new GF type ---------- -max_gf = MAX_GF -function add_spell_type(t) - t.index = max_gf - max_gf = max_gf + 1 - assert(t.color, "No GF color") - if not t.monster then t.monster = function() end end - if not t.angry then t.angry = function() end end - if not t.object then t.object = function() end end - if not t.player then t.player = function() end end - if not t.grid then t.grid = function() end end - - add_hooks - { - [HOOK_GF_COLOR] = function (gf, new_gfx) - local t = %t - if gf == t.index then return TRUE, t.color[new_gfx + 1] end - end, - [HOOK_GF_EXEC] = function (action, who, gf, dam, rad, y, x, extra) - local t = %t - if t.index == gf then - return t[action](who, dam, rad, y, x, extra) - end - end, - } - return t.index -end -- cgit v1.2.3