From 818696e7d00a0f504f9e147ee691164ae391e0bb Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 6 Apr 2012 18:31:10 +0200 Subject: Lua: Remove dead Lua code dealing with corruption hooks --- lib/core/crpt_aux.lua | 16 +--------------- lib/mods/theme/core/crpt_aux.lua | 16 +--------------- lib/mods/theme/scpt/corrupt.lua | 3 --- lib/scpt/corrupt.lua | 3 --- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/lib/core/crpt_aux.lua b/lib/core/crpt_aux.lua index 85cddbf3..7703a815 100644 --- a/lib/core/crpt_aux.lua +++ b/lib/core/crpt_aux.lua @@ -149,23 +149,9 @@ function add_corruption(c) __corruptions[o].oppose[__corruptions_max] = TRUE end - local index, h - if type(c.hooks) == "table" then - for index, h in c.hooks do - add_hook_script(index, "__lua__corrupt_callback"..__corruptions_callbacks_max, "__lua__corrupt_callback"..__corruptions_callbacks_max) - setglobal("__lua__corrupt_callback"..__corruptions_callbacks_max, - function (...) - if test_depend_corrupt(%__corruptions_max) == TRUE then - return call(%h, arg) - end - end - ) - __corruptions_callbacks_max = __corruptions_callbacks_max + 1 - end - end - if type(c.desc) == "table" then local new_desc = "" + local index, h for index, h in c.desc do new_desc = new_desc..h.."\n" end diff --git a/lib/mods/theme/core/crpt_aux.lua b/lib/mods/theme/core/crpt_aux.lua index 85cddbf3..7703a815 100644 --- a/lib/mods/theme/core/crpt_aux.lua +++ b/lib/mods/theme/core/crpt_aux.lua @@ -149,23 +149,9 @@ function add_corruption(c) __corruptions[o].oppose[__corruptions_max] = TRUE end - local index, h - if type(c.hooks) == "table" then - for index, h in c.hooks do - add_hook_script(index, "__lua__corrupt_callback"..__corruptions_callbacks_max, "__lua__corrupt_callback"..__corruptions_callbacks_max) - setglobal("__lua__corrupt_callback"..__corruptions_callbacks_max, - function (...) - if test_depend_corrupt(%__corruptions_max) == TRUE then - return call(%h, arg) - end - end - ) - __corruptions_callbacks_max = __corruptions_callbacks_max + 1 - end - end - if type(c.desc) == "table" then local new_desc = "" + local index, h for index, h in c.desc do new_desc = new_desc..h.."\n" end diff --git a/lib/mods/theme/scpt/corrupt.lua b/lib/mods/theme/scpt/corrupt.lua index 1bb976df..f1d83c26 100644 --- a/lib/mods/theme/scpt/corrupt.lua +++ b/lib/mods/theme/scpt/corrupt.lua @@ -525,8 +525,5 @@ CORRUPT_ = add_corruption { " ", }, - ["hooks"] = - { - }, } ]] diff --git a/lib/scpt/corrupt.lua b/lib/scpt/corrupt.lua index 27746cc9..a1bc98a4 100644 --- a/lib/scpt/corrupt.lua +++ b/lib/scpt/corrupt.lua @@ -242,8 +242,5 @@ CORRUPT_ = add_corruption { " ", }, - ["hooks"] = - { - }, } ]] -- cgit v1.2.3