Allow per world mod configuration

This commit is contained in:
stujones11 2015-02-19 19:37:51 +00:00
parent 656b6155a5
commit f76d746b75

View file

@ -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