From a00ed11376064353475b29c23b6deebc1cc1dfc9 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 11 Jun 2012 20:08:36 +0200 Subject: Lua: Move the last game-specific scripting files to C --- lib/CMakeLists.txt | 1 - lib/core/init.lua | 9 --------- lib/mods/theme/core/init.lua | 9 --------- lib/mods/theme/scpt/init.lua | 14 -------------- lib/scpt/init.lua | 14 -------------- src/script.c | 8 ++++++++ 6 files changed, 8 insertions(+), 47 deletions(-) delete mode 100644 lib/mods/theme/scpt/init.lua delete mode 100644 lib/scpt/init.lua 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(); } -- cgit v1.2.3