diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 07:15:21 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 07:15:21 +0200 |
commit | 03aa3417ca54eeb3ebf61557d062a5c31bf0172e (patch) | |
tree | ac057913cccd49e99dc0f2d515c94c9c058e00cf /lib/mods/theme/core/gods.lua | |
parent | 79531149c7493b1126febb21bb7bfc958d6d3e2a (diff) | |
parent | 049a6c9ad822840b80a52e68a3095a2f072c74a2 (diff) |
Merge branch 'unlua'
Diffstat (limited to 'lib/mods/theme/core/gods.lua')
-rw-r--r-- | lib/mods/theme/core/gods.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/mods/theme/core/gods.lua b/lib/mods/theme/core/gods.lua deleted file mode 100644 index 77e0aad5..00000000 --- a/lib/mods/theme/core/gods.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Gods helper files - --- Gods structs - -__gods_hook = {} -__gods_callbacks = {} -__gods_callbacks_max = 0 - -function add_god(q) - local i, index, d, z, qq - - assert(q.name, "No god name") - assert(q.desc, "No god desc") - assert(q.hooks, "No god hooks") - - i = add_new_gods(q.name); - - z = 0 - for index, d in q.desc do - desc_god(i, z, d); - z = z + 1 - end - - __gods_hook[i] = q.hooks - for index, d in q.hooks do - add_hook_script(index, "__lua__gods_callback"..__gods_callbacks_max, "__lua__gods_callback"..__gods_callbacks_max) - setglobal("__lua__gods_callback"..__gods_callbacks_max, d) - __gods_callbacks_max = __gods_callbacks_max + 1 - end - if q.data then - for index, d in q.data do - -- Besure it exists - setglobal(index, d) - - -- Make it save & load - add_loadsave(index, d) - end - end - return i -end |