From 88653b432eebf70d79f872540a648ff5db25449c Mon Sep 17 00:00:00 2001 From: cheapie Date: Fri, 11 Aug 2023 22:27:14 -0500 Subject: Add hoistway door nodes No motion or other functionality yet --- doors.lua | 149 ++++++++++++++++++++++++++++ init.lua | 1 + textures/celevator_door_glass_edge.png | Bin 0 -> 565 bytes textures/celevator_door_glass_middle.png | Bin 0 -> 607 bytes textures/celevator_door_glass_topbottom.png | Bin 0 -> 614 bytes 5 files changed, 150 insertions(+) create mode 100644 doors.lua create mode 100644 textures/celevator_door_glass_edge.png create mode 100644 textures/celevator_door_glass_middle.png create mode 100644 textures/celevator_door_glass_topbottom.png 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 Binary files /dev/null and b/textures/celevator_door_glass_edge.png differ diff --git a/textures/celevator_door_glass_middle.png b/textures/celevator_door_glass_middle.png new file mode 100644 index 0000000..ff40a7d Binary files /dev/null and b/textures/celevator_door_glass_middle.png differ diff --git a/textures/celevator_door_glass_topbottom.png b/textures/celevator_door_glass_topbottom.png new file mode 100644 index 0000000..d1d8887 Binary files /dev/null and b/textures/celevator_door_glass_topbottom.png differ -- cgit v1.2.3