summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-11 17:38:55 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-11 17:38:55 +0200
commitf802db8cbf123d07c8a373b0cfc4188de34f386e (patch)
tree6525525c9ca95ec2a109d82785ac406c7e4c044a /lib
parent5a310053e1ed6331155e4c4a3a645291c0a95650 (diff)
Lua: Gods: Move Theme god definitions to C
Diffstat (limited to 'lib')
-rw-r--r--lib/core/gods.lua40
-rw-r--r--lib/core/player.lua5
-rw-r--r--lib/mods/theme/core/gods.lua40
-rw-r--r--lib/mods/theme/core/player.lua5
-rw-r--r--lib/mods/theme/scpt/gods_new.lua49
-rw-r--r--lib/mods/theme/scpt/init.lua1
6 files changed, 0 insertions, 140 deletions
diff --git a/lib/core/gods.lua b/lib/core/gods.lua
index 77e0aad5..e69de29b 100644
--- a/lib/core/gods.lua
+++ b/lib/core/gods.lua
@@ -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
diff --git a/lib/core/player.lua b/lib/core/player.lua
index e194b45a..cb1b5cab 100644
--- a/lib/core/player.lua
+++ b/lib/core/player.lua
@@ -3,11 +3,6 @@
-- Lua player funtions
--
--- Gods
-function deity(i)
- return deity_info[1 + i]
-end
-
-------- skill stuff ---------
-- Easy skill access
diff --git a/lib/mods/theme/core/gods.lua b/lib/mods/theme/core/gods.lua
index 77e0aad5..e69de29b 100644
--- a/lib/mods/theme/core/gods.lua
+++ b/lib/mods/theme/core/gods.lua
@@ -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
diff --git a/lib/mods/theme/core/player.lua b/lib/mods/theme/core/player.lua
index e194b45a..cb1b5cab 100644
--- a/lib/mods/theme/core/player.lua
+++ b/lib/mods/theme/core/player.lua
@@ -3,11 +3,6 @@
-- Lua player funtions
--
--- Gods
-function deity(i)
- return deity_info[1 + i]
-end
-
-------- skill stuff ---------
-- Easy skill access
diff --git a/lib/mods/theme/scpt/gods_new.lua b/lib/mods/theme/scpt/gods_new.lua
deleted file mode 100644
index e9b9241e..00000000
--- a/lib/mods/theme/scpt/gods_new.lua
+++ /dev/null
@@ -1,49 +0,0 @@
--- This file contains all the new gods
-
-GOD_AULE = add_god
-{
- ["name"] = "Aule the Smith",
- ["desc"] =
- {
- "Aule is a smith, and the creator of the Dwarves."
- },
- ["hooks"] =
- {
- }
-}
-
-GOD_VARDA = add_god
-{
- ["name"] = "Varda Elentari",
- ["desc"] =
- {
- "The Queen of the Stars. In light is her power and joy."
- },
- ["hooks"] =
- {
- },
-}
-
-GOD_ULMO = add_god
-{
- ["name"] = "Ulmo",
- ["desc"] =
- {
- "Ulmo is called Lord of Waters, he rules all that is water on Arda."
- },
- ["hooks"] =
- {
- },
-}
-
-GOD_MANDOS = add_god
-{
- ["name"] = "Mandos",
- ["desc"] =
- {
- "The Doomsman of the Valar and keeper of the slain."
- },
- ["hooks"] =
- {
- }
-}
diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua
index 93a6e772..715f6dc5 100644
--- a/lib/mods/theme/scpt/init.lua
+++ b/lib/mods/theme/scpt/init.lua
@@ -16,7 +16,6 @@ tome_dofile("mkeys.lua")
-- Add god stuff
tome_dofile("gods.lua")
-tome_dofile("gods_new.lua")
-- Add the schools of magic
tome_dofile("spells.lua")