2013-01-03 19:31:49 -08:00
|
|
|
--run Files
|
2013-01-06 19:40:50 -08:00
|
|
|
|
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()
|
2013-01-17 17:23:22 -08:00
|
|
|
io.output(minetest.get_worldpath().."/adventures_checkpoints")
|
|
|
|
io.write("initialized")
|
|
|
|
io.flush()
|
|
|
|
io.close()
|
2013-01-05 20:56:30 -08:00
|
|
|
io.output(minetest.get_worldpath().."/adventures_previousmode")
|
|
|
|
io.write("initialized")
|
|
|
|
io.flush()
|
|
|
|
io.close()
|
2013-01-03 19:31:49 -08:00
|
|
|
end
|
|
|
|
|
2013-01-18 14:50:56 -08:00
|
|
|
local inv = minetest.create_detached_inventory("initialstuff")
|
|
|
|
inv:set_size("initialstuff", 32)
|
|
|
|
|
2013-01-03 19:31:49 -08:00
|
|
|
local modpath=minetest.get_modpath("adventures")
|
2013-01-17 17:23:22 -08:00
|
|
|
dofile(modpath.."/global.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")
|
2013-01-07 18:05:14 -08:00
|
|
|
if creative == "1" then dofile(modpath.."/creative.lua")
|
2013-01-03 19:31:49 -08:00
|
|
|
else dofile(modpath.."/standard.lua")
|
|
|
|
end
|