forked from rubenwardy/awards
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.lua
36 lines (30 loc) · 1.32 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- Copyright (c) 2013-18 rubenwardy. MIT.
-- The global award namespace
awards = {
show_mode = "hud",
registered_triggers = {},
}
-- Internationalization support.
awards.gettext, awards.ngettext = dofile(minetest.get_modpath("awards").."/src/intllib.lua")
-- Load files
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
awards.getFormspec = awards.get_formspec
awards.showto = awards.show_to
awards.register_onDig = awards.register_on_dig
awards.register_onPlace = awards.register_on_place
awards.register_onDeath = awards.register_on_death
awards.register_onChat = awards.register_on_chat
awards.register_onJoin = awards.register_on_join
awards.register_onCraft = awards.register_on_craft
awards.def = awards.registered_awards
awards.register_achievement = awards.register_award