This commit is contained in:
HybridDog 2015-05-29 12:09:25 +02:00
parent 55fd22890b
commit 95a528221c
2 changed files with 4 additions and 4 deletions

@ -381,7 +381,7 @@ function funcs.explosion_table(r)
for x=-r,r do
for y=-r,r do
for z=-r,r do
local rc = x*x+y*y+z*z
local rc = x*x+y*y+z*z
if rc <= tmp then
local np={x=x, y=y, z=z}
if math.floor(math.sqrt(rc) +0.5) > r-1 then

@ -3,12 +3,12 @@ vector.meta.nodes = {}
vector.meta.nodes_file = {
load = function()
local nodesfile = io.open(minetest.get_worldpath()..'/vector_nodes.txt', "r")
local nodesfile = io.open(minetest.get_worldpath()..'/vector_nodes.txt', "r")
if nodesfile then
local contents = nodesfile:read('*all')
io.close(nodesfile)
if contents ~= nil then
local lines = string.split(contents, "\n")
if contents ~= nil then
local lines = string.split(contents, "\n")
for _,entry in ipairs(lines) do
local name, px, py, pz, meta = unpack(string.split(entry, "°"))
vector.meta.set_node({x=px, y=py, z=pz}, name, meta)