summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-09-13 17:31:58 +0100
committerrubenwardy <rw@rubenwardy.com>2018-09-13 17:33:04 +0100
commit29a1b97b3849daaf07e2d3789b54817101e9061c (patch)
tree7fc5032035718ea9a03a8ef51475610153f5f0b2 /init.lua
parentb856aea54dde26adcb81add8dd3e835ff6c801c1 (diff)
Improve code structure and awards formspec size
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