summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2023-08-11 22:27:14 -0500
committercheapie <no-email-for-you@example.com>2023-08-11 22:27:14 -0500
commit88653b432eebf70d79f872540a648ff5db25449c (patch)
tree5cbdbd1525616f62d91eaab9a800f3793efaba57
parentdcf53af2d26f16ca6f418e8f1c1f283b2b4276ce (diff)
downloadcelevator-88653b432eebf70d79f872540a648ff5db25449c.tar
celevator-88653b432eebf70d79f872540a648ff5db25449c.tar.gz
celevator-88653b432eebf70d79f872540a648ff5db25449c.tar.bz2
celevator-88653b432eebf70d79f872540a648ff5db25449c.tar.xz
celevator-88653b432eebf70d79f872540a648ff5db25449c.zip
Add hoistway door nodes
No motion or other functionality yet
-rw-r--r--doors.lua149
-rw-r--r--init.lua1
-rw-r--r--textures/celevator_door_glass_edge.pngbin0 -> 565 bytes
-rw-r--r--textures/celevator_door_glass_middle.pngbin0 -> 607 bytes
-rw-r--r--textures/celevator_door_glass_topbottom.pngbin0 -> 614 bytes
5 files changed, 150 insertions, 0 deletions
diff --git a/doors.lua b/doors.lua
new file mode 100644
index 0000000..ecfbcf6
--- /dev/null
+++ b/doors.lua
@@ -0,0 +1,149 @@
+minetest.register_node("celevator:hwdoor_fast_glass_bottom",{
+ description = "Glass Hoistway Door (fast, bottom)",
+ tiles = {
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_topbottom.png^[transformFY",
+ "celevator_door_glass_topbottom.png^[transformFY",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.4,0.5,0.5,0.5},
+ },
+ },
+})
+
+minetest.register_node("celevator:hwdoor_fast_glass_middle",{
+ description = "Glass Hoistway Door (fast, middle)",
+ tiles = {
+ "celevator_transparent.png",
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_middle.png",
+ "celevator_door_glass_middle.png",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.4,0.5,0.5,0.5},
+ },
+ },
+})
+
+minetest.register_node("celevator:hwdoor_fast_glass_top",{
+ description = "Glass Hoistway Door (fast, top)",
+ tiles = {
+ "celevator_door_glass_edge.png",
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_topbottom.png",
+ "celevator_door_glass_topbottom.png",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.4,0.5,0.5,0.5},
+ },
+ },
+})
+
+minetest.register_node("celevator:hwdoor_slow_glass_bottom",{
+ description = "Glass Hoistway Door (slow, bottom)",
+ tiles = {
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_topbottom.png^[transformFY",
+ "celevator_door_glass_topbottom.png^[transformFY",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.3,0.5,0.5,0.4},
+ },
+ },
+})
+
+minetest.register_node("celevator:hwdoor_slow_glass_middle",{
+ description = "Glass Hoistway Door (slow, middle)",
+ tiles = {
+ "celevator_transparent.png",
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_middle.png",
+ "celevator_door_glass_middle.png",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.3,0.5,0.5,0.4},
+ },
+ },
+})
+
+minetest.register_node("celevator:hwdoor_slow_glass_top",{
+ description = "Glass Hoistway Door (slow, top)",
+ tiles = {
+ "celevator_door_glass_edge.png",
+ "celevator_transparent.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_edge.png",
+ "celevator_door_glass_topbottom.png",
+ "celevator_door_glass_topbottom.png",
+ },
+ groups = {
+ dig_immediate = 2,
+ },
+ paramtype = "light",
+ paramtype2 = "4dir",
+ drawtype = "nodebox",
+ use_texture_alpha = "clip",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,0.3,0.5,0.5,0.4},
+ },
+ },
+})
diff --git a/init.lua b/init.lua
index d819b81..b8b680e 100644
--- a/init.lua
+++ b/init.lua
@@ -1,6 +1,7 @@
local components = {
"framework",
"car",
+ "doors",
"drive_null",
"drive_entity",
"controller",
diff --git a/textures/celevator_door_glass_edge.png b/textures/celevator_door_glass_edge.png
new file mode 100644
index 0000000..217a409
--- /dev/null
+++ b/textures/celevator_door_glass_edge.png
Binary files differ
diff --git a/textures/celevator_door_glass_middle.png b/textures/celevator_door_glass_middle.png
new file mode 100644
index 0000000..ff40a7d
--- /dev/null
+++ b/textures/celevator_door_glass_middle.png
Binary files differ
diff --git a/textures/celevator_door_glass_topbottom.png b/textures/celevator_door_glass_topbottom.png
new file mode 100644
index 0000000..d1d8887
--- /dev/null
+++ b/textures/celevator_door_glass_topbottom.png
Binary files differ