aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-03-15 12:04:10 +0100
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-03-15 12:04:10 +0100
commitfb837a449af3bc3f5d70b10d807fc53982520e9f (patch)
tree01775ba838aa648b0450d9af1714df62b6296b78
parent372cd7eb802934a4b567f61c84dc634ee1a463dd (diff)
parent301dcf953e9a73d0e92f1a48af141200891f0e55 (diff)
downloadadvtrains-release-2.1.2.tar.gz
advtrains-release-2.1.2.tar.bz2
advtrains-release-2.1.2.zip
Merge branch 'diagonal_platforms' of https://github.com/Montandalar/advtrainsrelease-2.1.2
-rw-r--r--advtrains/misc_nodes.lua33
-rw-r--r--advtrains/models/advtrains_platform_diag.b3dbin0 -> 1970 bytes
-rw-r--r--advtrains/textures/advtrains_platform_diag.pngbin0 -> 93 bytes
3 files changed, 31 insertions, 2 deletions
diff --git a/advtrains/misc_nodes.lua b/advtrains/misc_nodes.lua
index 85fb0ef..f1fb030 100644
--- a/advtrains/misc_nodes.lua
+++ b/advtrains/misc_nodes.lua
@@ -38,14 +38,36 @@ function advtrains.register_platform(modprefix, preset)
node_box = {
type = "fixed",
fixed = {
- {-0.5, 0.3, -0.1, 0.5, 0.5, 0.5},
- {-0.5, -0.5, 0 , 0.5, 0.3, 0.5}
+ {-0.5, 0.3, 0, 0.5, 0.5, 0.5},
+ {-0.5, -0.5, 0.1 , 0.5, 0.3, 0.5}
},
},
paramtype2="facedir",
paramtype = "light",
sunlight_propagates = true,
})
+ local diagonalbox = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, 0.5, -0.25, 0.5, -0.8 },
+ {-0.25, -0.5, 0.5 , 0, 0.5, -0.55},
+ {0, -0.5, 0.5 , 0.25, 0.5, -0.3 },
+ {0.25 , -0.5, 0.5, 0.5, 0.5, -0.05}
+ }
+ }
+ minetest.register_node(modprefix..":platform_45_"..nodename, {
+ description = attrans("@1 Platform (45 degree)", desc),
+ groups = {cracky = 1, not_blocking_trains = 1, platform=2},
+ sounds = default.node_sound_stone_defaults(),
+ drawtype = "mesh",
+ mesh = "advtrains_platform_diag.b3d",
+ selection_box = diagonalbox,
+ collision_box = diagonalbox,
+ tiles = {btex, btex.."^advtrains_platform_diag.png"},
+ paramtype2 = "facedir",
+ paramtype = "light",
+ sunlight_propagates = true,
+ })
minetest.register_craft({
type="shapeless",
output = modprefix .. ":platform_high_"..nodename.." 4",
@@ -60,6 +82,13 @@ function advtrains.register_platform(modprefix, preset)
"dye:yellow", preset
},
})
+ minetest.register_craft({
+ type="shapeless",
+ output = modprefix .. ":platform_45_"..nodename.." 2",
+ recipe = {
+ "dye:yellow", preset, preset, preset
+ }
+ })
end
diff --git a/advtrains/models/advtrains_platform_diag.b3d b/advtrains/models/advtrains_platform_diag.b3d
new file mode 100644
index 0000000..46c8bd9
--- /dev/null
+++ b/advtrains/models/advtrains_platform_diag.b3d
Binary files differ
diff --git a/advtrains/textures/advtrains_platform_diag.png b/advtrains/textures/advtrains_platform_diag.png
new file mode 100644
index 0000000..6e262e2
--- /dev/null
+++ b/advtrains/textures/advtrains_platform_diag.png
Binary files differ