Commit f846f562 authored by SmallJoker's avatar SmallJoker

Add new configuration loading

parent 525a89c6
--Created by Krock for the BitChange mod
local mod_path = minetest.get_modpath("bitchange")
local world_path = minetest.get_worldpath()
if freeminer then
minetest = freeminer
end
dofile(mod_path.."/config.txt")
dofile(mod_path.."/config.default.txt")
-- Copied from moretrees mod
if io.open(world_path.."/bitchange_config.txt","r") == nil then
io.input(mod_path.."/config.default.txt")
io.output(world_path.."/bitchange_config.txt")
while true do
local block = io.read(256) -- 256B at once
if not block then
io.close()
break
end
io.write(block)
end
else
dofile(world_path.."/bitchange_config.txt")
end
dofile(mod_path.."/minecoins.lua")
if(bitchange_use_moreores_tin or bitchange_use_technic_zinc or bitchange_use_gold) then
dofile(mod_path.."/moreores.lua")
......@@ -52,4 +70,4 @@ function bitchange_has_access(owner, player_name)
return (player_name == owner or minetest.get_player_privs(player_name).server or minetest.get_player_privs(player_name).bitchange)
end
print("[BitChange] Loaded.")
\ No newline at end of file
print("[BitChange] Loaded.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment