summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-06-11 20:08:36 +0200
committerBardur Arantsson <bardur@scientician.net>2012-06-19 18:36:19 +0200
commita00ed11376064353475b29c23b6deebc1cc1dfc9 (patch)
treee800dc12b19535752efc9907f128ab78da38825b
parentcd328f56d295a6e8c17cd12110368a489cf82b58 (diff)
Lua: Move the last game-specific scripting files to C
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/core/init.lua9
-rw-r--r--lib/mods/theme/core/init.lua9
-rw-r--r--lib/mods/theme/scpt/init.lua14
-rw-r--r--lib/scpt/init.lua14
-rw-r--r--src/script.c8
6 files changed, 8 insertions, 47 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index acb87b25..245d98f8 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -17,7 +17,6 @@ INSTALL(DIRECTORY
plot
pref
save
- scpt
user
xtra
DESTINATION ${DEFAULT_PATH}
diff --git a/lib/core/init.lua b/lib/core/init.lua
index 5abc1571..de104e52 100644
--- a/lib/core/init.lua
+++ b/lib/core/init.lua
@@ -17,15 +17,6 @@ tome_dofile_anywhere(ANGBAND_DIR_CORE, "monsters.lua")
tome_dofile_anywhere(ANGBAND_DIR_CORE, "building.lua")
tome_dofile_anywhere(ANGBAND_DIR_CORE, "dungeon.lua")
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
--------------Here we load the non vital scripts---------------
------------------------from lib/scpt--------------------------
---------------------------------------------------------------
---------------------------------------------------------------
-tome_dofile("init.lua")
-
-- The dofile functions for each patch
patch_dofile = {}
diff --git a/lib/mods/theme/core/init.lua b/lib/mods/theme/core/init.lua
index 5abc1571..de104e52 100644
--- a/lib/mods/theme/core/init.lua
+++ b/lib/mods/theme/core/init.lua
@@ -17,15 +17,6 @@ tome_dofile_anywhere(ANGBAND_DIR_CORE, "monsters.lua")
tome_dofile_anywhere(ANGBAND_DIR_CORE, "building.lua")
tome_dofile_anywhere(ANGBAND_DIR_CORE, "dungeon.lua")
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
--------------Here we load the non vital scripts---------------
------------------------from lib/scpt--------------------------
---------------------------------------------------------------
---------------------------------------------------------------
-tome_dofile("init.lua")
-
-- The dofile functions for each patch
patch_dofile = {}
diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua
deleted file mode 100644
index edc82fe1..00000000
--- a/lib/mods/theme/scpt/init.lua
+++ /dev/null
@@ -1,14 +0,0 @@
---
--- This file is loaded at the initialisation of ToME
---
-
--- Add the schools of magic
-schools_init()
-school_spells_init()
-init_school_books()
-
--- Post-spell creation initialization
-initialize_bookable_spells()
-
--- Some tests, if the file is not present, this is fine
-tome_dofile_anywhere(ANGBAND_DIR_SCPT, "dg_test.lua", FALSE)
diff --git a/lib/scpt/init.lua b/lib/scpt/init.lua
deleted file mode 100644
index edc82fe1..00000000
--- a/lib/scpt/init.lua
+++ /dev/null
@@ -1,14 +0,0 @@
---
--- This file is loaded at the initialisation of ToME
---
-
--- Add the schools of magic
-schools_init()
-school_spells_init()
-init_school_books()
-
--- Post-spell creation initialization
-initialize_bookable_spells()
-
--- Some tests, if the file is not present, this is fine
-tome_dofile_anywhere(ANGBAND_DIR_SCPT, "dg_test.lua", FALSE)
diff --git a/src/script.c b/src/script.c
index 4d066a58..9a863146 100644
--- a/src/script.c
+++ b/src/script.c
@@ -226,6 +226,14 @@ void init_lua_init()
/* Load the first lua file */
tome_dofile_anywhere(ANGBAND_DIR_CORE, "init.lua", TRUE);
+ /* Initialize schooled spells */
+ schools_init();
+ school_spells_init();
+ init_school_books();
+
+ /* Post-spell creation initialization */
+ initialize_bookable_spells();
+
/* Finish up the corruptions */
init_corruptions();
}