forked from mtcontrib/moretrees
don't copy default settings to user's world folder.
This commit is contained in:
parent
2aad14a883
commit
1cd2216731
17
init.lua
17
init.lua
@ -24,21 +24,8 @@ local modpath=minetest.get_modpath("moretrees")
|
|||||||
|
|
||||||
dofile(modpath.."/default_settings.txt")
|
dofile(modpath.."/default_settings.txt")
|
||||||
|
|
||||||
if io.open(worldpath.."/moretrees_settings.txt","r") == nil then
|
if io.open(worldpath.."/moretrees_settings.txt","r") then
|
||||||
|
io.close()
|
||||||
io.input(modpath.."/default_settings.txt")
|
|
||||||
io.output(worldpath.."/moretrees_settings.txt")
|
|
||||||
|
|
||||||
local size = 2^13 -- good buffer size (8K)
|
|
||||||
while true do
|
|
||||||
local block = io.read(size)
|
|
||||||
if not block then
|
|
||||||
io.close()
|
|
||||||
break
|
|
||||||
end
|
|
||||||
io.write(block)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
dofile(worldpath.."/moretrees_settings.txt")
|
dofile(worldpath.."/moretrees_settings.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user