mirror of
https://github.com/HybridDog/nether-pack.git
synced 2025-04-16 08:50:40 +02:00
commit
8b37ba3a92
@ -315,7 +315,7 @@ for n,data in ipairs(guide_infos) do
|
|||||||
elseif typ == "x" then
|
elseif typ == "x" then
|
||||||
x = math.max(x, content)
|
x = math.max(x, content)
|
||||||
elseif typ == "text" then
|
elseif typ == "text" then
|
||||||
local tab = minetest.wrap_text(content, guide_size.fx)
|
local tab = minetest.wrap_text(content, guide_size.fx, true)
|
||||||
local l = guide_size.cx
|
local l = guide_size.cx
|
||||||
for _,str in ipairs(tab) do
|
for _,str in ipairs(tab) do
|
||||||
form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
|
form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
|
||||||
|
@ -691,10 +691,40 @@ function nether.grow_netherstructure(pos, generated)
|
|||||||
set_vm_data(manip, nodes, pos, t1, "blood", generated)
|
set_vm_data(manip, nodes, pos, t1, "blood", generated)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function set(tab, z,y,x, data)
|
||||||
|
if tab[z] then
|
||||||
|
if tab[z][y] then
|
||||||
|
tab[z][y][x] = data
|
||||||
|
return
|
||||||
|
end
|
||||||
|
tab[z][y] = {[x] = data}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
tab[z] = {[y] = {[x] = data}}
|
||||||
|
end
|
||||||
|
|
||||||
local set = vector.set_data_to_pos
|
local function get(tab, z,y,x)
|
||||||
local get = vector.get_data_from_pos
|
local data = tab[z]
|
||||||
local remove = vector.remove_data_from_pos
|
if data then
|
||||||
|
data = data[y]
|
||||||
|
if data then
|
||||||
|
return data[x]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function remove(tab, z,y,x)
|
||||||
|
if get(tab, z,y,x) == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
tab[z][y][x] = nil
|
||||||
|
if not next(tab[z][y]) then
|
||||||
|
tab[z][y] = nil
|
||||||
|
end
|
||||||
|
if not next(tab[z]) then
|
||||||
|
tab[z] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function soft_node(id)
|
local function soft_node(id)
|
||||||
return id == c.air or id == c.ignore
|
return id == c.air or id == c.ignore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user