2013-01-03 19:31:49 -08:00
|
|
|
--run Files
|
2013-01-05 20:56:30 -08:00
|
|
|
local file = io.open(minetest.get_worldpath().."/adventures_init", "r")
|
|
|
|
if(file == nil) then
|
|
|
|
print("Initialize")
|
|
|
|
io.output(minetest.get_worldpath().."/adventures_init")
|
|
|
|
io.write("initialized")
|
|
|
|
io.flush()
|
|
|
|
io.close()
|
|
|
|
io.output(minetest.get_worldpath().."/adventures_sources")
|
|
|
|
io.write("initialized")
|
|
|
|
io.flush()
|
|
|
|
io.close()
|
|
|
|
io.output(minetest.get_worldpath().."/adventures_previousmode")
|
|
|
|
io.write("initialized")
|
|
|
|
io.flush()
|
|
|
|
io.close()
|
2013-01-03 19:31:49 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
local modpath=minetest.get_modpath("adventures")
|
|
|
|
dofile(modpath.."/tables.lua")
|
2013-01-05 20:56:30 -08:00
|
|
|
dofile(modpath.."/decode.lua")
|
2013-01-03 19:31:49 -08:00
|
|
|
local creative = minetest.setting_get("creative_mode")
|
|
|
|
if creative then dofile(modpath.."/creative.lua")
|
|
|
|
else dofile(modpath.."/standard.lua")
|
|
|
|
end
|