mirror of
https://github.com/HybridDog/vector_extras.git
synced 2024-11-13 05:50:33 +01:00
🐈
This commit is contained in:
parent
55fd22890b
commit
95a528221c
2
init.lua
2
init.lua
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user