adventures/init.lua

33 lines
936 B
Lua
Raw Normal View History

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_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
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")
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")
if creative == "1" then dofile(modpath.."/creative.lua")
2013-01-03 19:31:49 -08:00
else dofile(modpath.."/standard.lua")
end