mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 07:13:48 +01:00
Do not use moreblocks for stairway lattice slope
This commit is contained in:
parent
258734e9da
commit
3a8148ba2b
@ -1,3 +1,2 @@
|
|||||||
default
|
default
|
||||||
moreblocks?
|
|
||||||
|
|
||||||
|
@ -504,69 +504,53 @@ minetest.register_node("techpack_stairway:lattice", {
|
|||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("moreblocks") then
|
minetest.register_node("techpack_stairway:lattice_slop", {
|
||||||
stairsplus:register_all("techpack_stairway", "lattice", "techpack_stairway:lattice", {
|
description = S("TechPack Lattice Slope"),
|
||||||
description = S("TechPack Lattice"),
|
tiles = {
|
||||||
tiles = {
|
'techpack_stairway_lattice.png',
|
||||||
'techpack_stairway_lattice.png',
|
},
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh="techpack_stairway_slope.obj",
|
||||||
|
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
|
||||||
|
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
|
||||||
|
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
|
||||||
|
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
sunlight_propagates = true,
|
|
||||||
is_ground_content = false,
|
collision_box = {
|
||||||
groups = {cracky = 2},
|
type = "fixed",
|
||||||
sounds = default.node_sound_metal_defaults(),
|
fixed = {
|
||||||
})
|
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
|
||||||
|
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
|
||||||
minetest.register_alias("techpack_stairway:lattice_slop", "techpack_stairway:slope_lattice")
|
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
|
||||||
else
|
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
|
||||||
minetest.register_node("techpack_stairway:lattice_slop", {
|
|
||||||
description = S("TechPack Lattice Slope"),
|
|
||||||
tiles = {
|
|
||||||
'techpack_stairway_lattice.png',
|
|
||||||
},
|
},
|
||||||
drawtype = "mesh",
|
},
|
||||||
mesh="techpack_stairway_slope.obj",
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
selection_box = {
|
local node = minetest.get_node(pos)
|
||||||
type = "fixed",
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
fixed = {
|
if pointed_thing.under.y >= pointed_thing.above.y then
|
||||||
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
|
local newparam2 = ({[0] = 8, [1] = 17, [2] = 22, [3] = 15})[node.param2]
|
||||||
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
|
if newparam2 then
|
||||||
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
|
node.param2 = newparam2
|
||||||
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
|
minetest.swap_node(pos, node)
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
|
|
||||||
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
|
|
||||||
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
|
|
||||||
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
local dir = minetest.facedir_to_dir(node.param2)
|
|
||||||
if pointed_thing.under.y >= pointed_thing.above.y then
|
|
||||||
local newparam2 = ({[0] = 8, [1] = 17, [2] = 22, [3] = 15})[node.param2]
|
|
||||||
if newparam2 then
|
|
||||||
node.param2 = newparam2
|
|
||||||
minetest.swap_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
|
end,
|
||||||
paramtype2 = "facedir",
|
|
||||||
paramtype = "light",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
sunlight_propagates = true,
|
||||||
groups = {cracky = 2},
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_metal_defaults(),
|
groups = {cracky = 2},
|
||||||
})
|
sounds = default.node_sound_metal_defaults(),
|
||||||
end
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "techpack_stairway:grating 4",
|
output = "techpack_stairway:grating 4",
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
name=techpack_stairway
|
name=techpack_stairway
|
||||||
description=Simple stairways and bridges for your machines.
|
description=Simple stairways and bridges for your machines.
|
||||||
depends=default
|
depends=default
|
||||||
optional_depends=moreblocks
|
|
||||||
|
Loading…
Reference in New Issue
Block a user