2014-09-26 21:36:40 +02:00
|
|
|
-- AWARDS
|
2015-06-10 19:48:20 +02:00
|
|
|
--
|
|
|
|
-- Copyright (C) 2013-2015 rubenwardy
|
|
|
|
-- This program is free software; you can redistribute it and/or modify
|
|
|
|
-- it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
-- the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
-- (at your option) any later version.
|
|
|
|
-- This program is distributed in the hope that it will be useful,
|
|
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
-- GNU Lesser General Public License for more details.
|
|
|
|
-- You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
-- with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
--
|
|
|
|
|
2017-02-21 08:45:45 +01:00
|
|
|
-- The global award namespace
|
|
|
|
awards = {
|
2018-04-04 18:01:55 +02:00
|
|
|
show_mode = "hud",
|
|
|
|
registered_triggers = {},
|
2017-02-21 08:45:45 +01:00
|
|
|
}
|
2013-02-22 18:53:42 +01:00
|
|
|
|
2017-02-21 08:45:45 +01:00
|
|
|
-- Internationalization support.
|
2018-04-04 18:01:55 +02:00
|
|
|
awards.gettext, awards.ngettext = dofile(minetest.get_modpath("awards").."/intllib.lua")
|
2018-04-04 18:42:12 +02:00
|
|
|
|
|
|
|
-- Load files
|
2013-02-22 21:43:40 +01:00
|
|
|
dofile(minetest.get_modpath("awards").."/api.lua")
|
2015-06-10 18:45:18 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/chat_commands.lua")
|
2018-04-04 18:37:43 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/gui.lua")
|
2015-06-10 20:18:56 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/triggers.lua")
|
2018-04-04 22:11:40 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/awards.lua")
|
2018-04-04 18:01:55 +02:00
|
|
|
|
2018-04-04 18:37:43 +02:00
|
|
|
-- 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
|
2018-04-04 18:43:44 +02:00
|
|
|
awards.def = awards.registered_awards
|