From f76d746b751dac3a51008498bdac65d7d645410d Mon Sep 17 00:00:00 2001 From: stujones11 Date: Thu, 19 Feb 2015 19:37:51 +0000 Subject: [PATCH] Allow per world mod configuration --- shooter.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shooter.lua b/shooter.lua index 463c64b..48fb583 100644 --- a/shooter.lua +++ b/shooter.lua @@ -47,12 +47,19 @@ if singleplayer then end local modpath = minetest.get_modpath(minetest.get_current_modname()) +local worldpath = minetest.get_worldpath() local input = io.open(modpath.."/shooter.conf", "r") if input then dofile(modpath.."/shooter.conf") input:close() input = nil end +input = io.open(worldpath.."/shooter.conf", "r") +if input then + dofile(worldpath.."/shooter.conf") + input:close() + input = nil +end local allowed_entities = {} for _,v in ipairs(SHOOTER_ENTITIES) do