summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index 0e96327..98f054a 100644
--- a/init.lua
+++ b/init.lua
@@ -7,14 +7,20 @@ awards = {
}
-- Internationalization support.
-awards.gettext, awards.ngettext = dofile(minetest.get_modpath("awards").."/intllib.lua")
+awards.gettext, awards.ngettext = dofile(minetest.get_modpath("awards").."/src/intllib.lua")
-- Load files
-dofile(minetest.get_modpath("awards").."/api.lua")
-dofile(minetest.get_modpath("awards").."/chat_commands.lua")
-dofile(minetest.get_modpath("awards").."/gui.lua")
-dofile(minetest.get_modpath("awards").."/triggers.lua")
-dofile(minetest.get_modpath("awards").."/awards.lua")
+dofile(minetest.get_modpath("awards").."/src/data.lua")
+dofile(minetest.get_modpath("awards").."/src/api_awards.lua")
+dofile(minetest.get_modpath("awards").."/src/api_triggers.lua")
+dofile(minetest.get_modpath("awards").."/src/chat_commands.lua")
+dofile(minetest.get_modpath("awards").."/src/gui.lua")
+dofile(minetest.get_modpath("awards").."/src/triggers.lua")
+dofile(minetest.get_modpath("awards").."/src/awards.lua")
+
+awards.load()
+minetest.register_on_shutdown(awards.save)
+
-- Backwards compatibility
awards.give_achievement = awards.unlock