Fixes and improvements for 'TechPack Stairway' Lattice

- Fix `Mesh not found: techpack_stairway_slope.obj` error on start by adding missing obj file taken from `moreblocks` mod
- When available, use `moreblocks` for creating different stairs and slopes
This commit is contained in:
Andrey Kozlovskiy 2021-01-16 01:32:05 +03:00 committed by GitHub
parent 4f0bdff0b9
commit cadc5f2f07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 117 additions and 44 deletions

1
.gitignore vendored

@ -10,7 +10,6 @@ luac.out
*.o *.o
*.os *.os
*.ko *.ko
*.obj
*.elf *.elf
# Precompiled Headers # Precompiled Headers

@ -1,2 +1,3 @@
default default
moreblocks?

@ -504,6 +504,21 @@ minetest.register_node("techpack_stairway:lattice", {
sounds = default.node_sound_metal_defaults(), sounds = default.node_sound_metal_defaults(),
}) })
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("techpack_stairway", "lattice", "techpack_stairway:lattice", {
description = S("TechPack Lattice"),
tiles = {
'techpack_stairway_lattice.png',
},
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2},
sounds = default.node_sound_metal_defaults(),
})
minetest.register_alias("techpack_stairway:lattice_slop", "techpack_stairway:slope_lattice")
else
minetest.register_node("techpack_stairway:lattice_slop", { minetest.register_node("techpack_stairway:lattice_slop", {
description = S("TechPack Lattice Slope"), description = S("TechPack Lattice Slope"),
tiles = { tiles = {
@ -551,6 +566,7 @@ minetest.register_node("techpack_stairway:lattice_slop", {
groups = {cracky = 2}, groups = {cracky = 2},
sounds = default.node_sound_metal_defaults(), sounds = default.node_sound_metal_defaults(),
}) })
end
minetest.register_craft({ minetest.register_craft({
output = "techpack_stairway:grating 4", output = "techpack_stairway:grating 4",

@ -1,3 +1,4 @@
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

@ -0,0 +1,56 @@
g top
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 0.500000
v -0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vn 0.0000 0.7071 -0.7071
s off
f 2/1/1 1/2/1 4/3/1 3/4/1
g bottom
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vn 0.0000 -1.0000 -0.0000
s off
f 6/5/2 5/6/2 7/7/2 8/8/2
g right
v -0.500000 0.500000 0.500000
v -0.500000 -0.500000 0.500000
v -0.500000 -0.500000 -0.500000
vt 1.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vn -1.0000 0.0000 0.0000
s off
f 9/9/3 11/10/3 10/11/3
g left
v 0.500000 0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vn 1.0000 0.0000 0.0000
s off
f 12/12/4 13/13/4 14/14/4
g back
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vn 0.0000 -0.0000 1.0000
s off
f 15/15/5 16/16/5 17/17/5 18/18/5