1
0
mirror of https://github.com/HybridDog/vector_extras.git synced 2025-06-29 14:50:26 +02:00

Version MFF.

This commit is contained in:
sys4-fr
2018-09-08 23:15:32 +02:00
parent a34d7eb231
commit 4a55c6db7b
5 changed files with 352 additions and 27 deletions

6
vector_meta.lua Normal file → Executable file
View File

@ -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)