summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-06 18:31:10 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-07 15:28:27 +0200
commit818696e7d00a0f504f9e147ee691164ae391e0bb (patch)
tree7d7dc8c7c08f95c8eceb62e57a20a160eaa7667c /lib
parent893ab1125bb3d25c184750aa146d3d6f5d82aa10 (diff)
Lua: Remove dead Lua code dealing with corruption hooks
Diffstat (limited to 'lib')
-rw-r--r--lib/core/crpt_aux.lua16
-rw-r--r--lib/mods/theme/core/crpt_aux.lua16
-rw-r--r--lib/mods/theme/scpt/corrupt.lua3
-rw-r--r--lib/scpt/corrupt.lua3
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"] =
- {
- },
}
]]