1 local S
= minetest
.get_translator("travelnet")
3 -- Doors that are especially useful for travelnet elevators but can also be used in other situations.
4 -- All doors (not only these here) in front of a travelnet or elevator are opened automaticly when a player arrives
5 -- and are closed when a player departs from the travelnet or elevator.
8 minetest
.register_node("travelnet:elevator_door_steel_open", {
9 description
= S("Stone Elevator Door (open)"),
11 tiles
= {"default_stone.png"},
13 paramtype2
= "facedir",
14 is_ground_content
= false,
15 groups
= {cracky
=2,oddly_breakable_by_hand
=2,not_in_creative_inventory
=1},
16 -- larger than one node but slightly smaller than a half node so that wallmounted torches pose no problem
20 {-0.90, -0.5, 0.4, -0.49, 1.5, 0.5},
21 { 0.49, -0.5, 0.4, 0.9, 1.5, 0.5},
27 {-0.9, -0.5, 0.4, 0.9, 1.5, 0.5},
30 drop
= "travelnet:elevator_door_steel_closed",
31 on_rightclick
= function(pos
, node
, puncher
)
32 minetest
.sound_play("mcl_fences_nether_brick_fence_gate_close", {pos
= pos
, gain
= 0.3, max_hear_distance
= 10}, true)
33 minetest
.add_node(pos
, {name
= "travelnet:elevator_door_steel_closed", param2
= node
.param2
})
36 sounds
= hades_sounds
.node_sound_stone_defaults(),
39 minetest
.register_node("travelnet:elevator_door_steel_closed", {
40 description
= S("Stone Elevator Door"),
42 tiles
= {"default_stone.png"},
44 paramtype2
= "facedir",
45 is_ground_content
= false,
46 groups
= {cracky
=2,oddly_breakable_by_hand
=2},
50 {-0.5, -0.5, 0.4, -0.01, 1.5, 0.5},
51 { 0.01, -0.5, 0.4, 0.5, 1.5, 0.5},
57 {-0.5, -0.5, 0.4, 0.5, 1.5, 0.5},
60 on_rightclick
= function(pos
, node
, puncher
)
61 minetest
.sound_play("mcl_fences_nether_brick_fence_gate_open", {pos
= pos
, gain
= 0.3, max_hear_distance
= 10}, true)
62 minetest
.add_node(pos
, {name
= "travelnet:elevator_door_steel_open", param2
= node
.param2
})
65 sounds
= hades_sounds
.node_sound_stone_defaults(),
68 minetest
.register_node("travelnet:elevator_door_glass_open", {
69 description
= S("Glass Elevator Door (open)"),
71 tiles
= {"travelnet_elevator_door_glass.png"},
73 paramtype2
= "facedir",
74 is_ground_content
= false,
75 groups
= {cracky
=3,oddly_breakable_by_hand
=3,not_in_creative_inventory
=1},
76 -- larger than one node but slightly smaller than a half node so that wallmounted torches pose no problem
80 {-0.99, -0.5, 0.4, -0.49, 1.5, 0.5},
81 { 0.49, -0.5, 0.4, 0.99, 1.5, 0.5},
87 {-0.9, -0.5, 0.4, 0.9, 1.5, 0.5},
90 drop
= "travelnet:elevator_door_glass_closed",
91 on_rightclick
= function(pos
, node
, puncher
)
92 minetest
.sound_play("doors_glass_door_close", {pos
= pos
, gain
= 0.3, max_hear_distance
= 10}, true)
93 minetest
.add_node(pos
, {name
= "travelnet:elevator_door_glass_closed", param2
= node
.param2
})
96 sounds
= hades_sounds
.node_sound_glass_defaults(),
99 minetest
.register_node("travelnet:elevator_door_glass_closed", {
100 description
= S("Glass Elevator Door"),
101 drawtype
= "nodebox",
102 tiles
= {"travelnet_elevator_door_glass.png"},
104 paramtype2
= "facedir",
105 is_ground_content
= false,
106 groups
= {cracky
=3,oddly_breakable_by_hand
=3},
110 {-0.5, -0.5, 0.4, -0.01, 1.5, 0.5},
111 { 0.01, -0.5, 0.4, 0.5, 1.5, 0.5},
117 {-0.5, -0.5, 0.4, 0.5, 1.5, 0.5},
120 on_rightclick
= function(pos
, node
, puncher
)
121 minetest
.sound_play("doors_glass_door_open", {pos
= pos
, gain
= 0.3, max_hear_distance
= 10}, true)
122 minetest
.add_node(pos
, {name
= "travelnet:elevator_door_glass_open", param2
= node
.param2
})
124 on_rotate
= "simple",
125 sounds
= hades_sounds
.node_sound_glass_defaults(),
128 minetest
.register_craft({
129 output
= "travelnet:elevator_door_glass_closed",
131 {"hades_core:glass", "", "hades_core:glass", },
132 {"hades_core:glass", "", "hades_core:glass", },
133 {"hades_core:glass", "", "hades_core:glass", }
137 minetest
.register_craft({
138 output
= "travelnet:elevator_door_steel_closed",
140 {"hades_core:stone", "", "hades_core:stone", },
141 {"hades_core:stone", "", "hades_core:stone", },
142 {"hades_core:stone", "", "hades_core:stone", }