From 8a34ea80553b51d94e2cb2243501f2df71ebe4aa Mon Sep 17 00:00:00 2001 From: Beha Date: Sat, 4 Apr 2020 13:46:41 -0400 Subject: [PATCH] Add awards.add_defaults setting to control adding default awards. Useful for games not based on MTG but using some of its mods. --- init.lua | 6 +++++- settingtypes.txt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 settingtypes.txt diff --git a/init.lua b/init.lua index 98f054a..25dc07f 100644 --- a/init.lua +++ b/init.lua @@ -16,7 +16,11 @@ 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") + +-- Optionally add default awards. +if minetest.settings:get_bool("awards.add_defaults", true) then + dofile(minetest.get_modpath("awards").."/src/awards.lua") +end awards.load() minetest.register_on_shutdown(awards.save) diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..1133d52 --- /dev/null +++ b/settingtypes.txt @@ -0,0 +1,2 @@ +# Add default achievements from the awards mod +awards.add_defaults (Add Default Achievements) bool true