Begin of Struct System (for pnj town / donjons / temple)

master
davedevils 2015-07-03 06:58:45 +02:00
parent 4052da3116
commit 899fc3c3c7
7 changed files with 25 additions and 0 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
return {{["y"] = 3, ["x"] = 0, ["name"] = "torches:wand", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 1, ["param1"] = 15}, {["y"] = 0, ["x"] = 1, ["name"] = "fences:fence_wood", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 0, ["param1"] = 157}, {["y"] = 1, ["x"] = 1, ["name"] = "fences:fence_wood", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 0, ["param1"] = 173}, {["y"] = 2, ["x"] = 1, ["name"] = "fences:fence_wood", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 0, ["param1"] = 189}, {["y"] = 3, ["x"] = 1, ["name"] = "torches:wand", ["z"] = 0, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 0, ["param1"] = 15}, {["y"] = 3, ["x"] = 1, ["name"] = "wool:black", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 0, ["param1"] = 0}, {["y"] = 3, ["x"] = 1, ["name"] = "torches:wand", ["z"] = 2, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 2, ["param1"] = 15}, {["y"] = 3, ["x"] = 2, ["name"] = "torches:wand", ["z"] = 1, ["meta"] = {["inventory"] = {}, ["fields"] = {}}, ["param2"] = 3, ["param1"] = 15}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,19 @@
local init = os.clock()
random_struct ={}
random_struct.get_struct = function(file)
local localfile = minetest.get_modpath("random_struct").."/build/"..file
local file, errorload = io.open(localfile, "rb")
if errorload ~= nil then
minetest.log("action", '[Random_Struct] error: could not open this struct "' .. localfile .. '"')
return nil
end
local allnode = file:read("*a")
file:close()
return allnode
end
local time_to_load= os.clock() - init
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))