Allow per world mod configuration
This commit is contained in:
parent
656b6155a5
commit
f76d746b75
1 changed files with 7 additions and 0 deletions
|
@ -47,12 +47,19 @@ if singleplayer then
|
||||||
end
|
end
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
local worldpath = minetest.get_worldpath()
|
||||||
local input = io.open(modpath.."/shooter.conf", "r")
|
local input = io.open(modpath.."/shooter.conf", "r")
|
||||||
if input then
|
if input then
|
||||||
dofile(modpath.."/shooter.conf")
|
dofile(modpath.."/shooter.conf")
|
||||||
input:close()
|
input:close()
|
||||||
input = nil
|
input = nil
|
||||||
end
|
end
|
||||||
|
input = io.open(worldpath.."/shooter.conf", "r")
|
||||||
|
if input then
|
||||||
|
dofile(worldpath.."/shooter.conf")
|
||||||
|
input:close()
|
||||||
|
input = nil
|
||||||
|
end
|
||||||
|
|
||||||
local allowed_entities = {}
|
local allowed_entities = {}
|
||||||
for _,v in ipairs(SHOOTER_ENTITIES) do
|
for _,v in ipairs(SHOOTER_ENTITIES) do
|
||||||
|
|
Loading…
Reference in a new issue