fix ladder node

master
MisterE123 2021-02-16 17:32:57 -05:00
parent 8ce0fe23a8
commit 7bf83a893f
2 changed files with 41 additions and 0 deletions

View File

@ -15,6 +15,44 @@ arena_lib.on_load("quikbild", function(arena)
arena_lib.HUD_send_msg_all("title", arena, 'QuikBild v 0.1', 3 ,nil,0xFF0000)
local pos1 = arena.build_area_pos_1
local pos2 = arena.build_area_pos_2
local x1 = pos1.x
local x2 = pos2.x
local y1 = pos1.y
local y2 = pos2.y
local z1 = pos1.z
local z2 = pos2.z
if x1 > x2 then
local temp = x2
x2 = x1
x1 = temp
end
if y1 > y2 then
local temp = y2
y2 = y1
y1 = temp
end
if z1 > z2 then
local temp = z2
z2 = z1
z1 = temp
end
for x = x1,x2 do
for y = y1,y2 do
for z = z1,z2 do
local nodename = minetest.get_node({x=x,y=y,z=z}).name
if string.find(nodename,'quikbild') or name == 'air' then
minetest.set_node({x=x,y=y,z=z}, {name="quikbild:climb"})
end
end
end
end
end)

View File

@ -9,6 +9,9 @@ minetest.register_node("quikbild:climb", {
buildable_to = true,
climbable = true,
walkable = false,
sunlight_propagates = true,
paramtype = 'light',
light_source = 6,
})