Replace wrong along_shore node identifier
[minetest_hades/hades_revisited.git] / mods / travelnet / doors.lua
blob46a12bec4139c1770807f471c3a3caa04071729b
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.
6 -- Autor: Sokomine
8 minetest.register_node("travelnet:elevator_door_steel_open", {
9 description = S("Stone Elevator Door (open)"),
10 drawtype = "nodebox",
11 tiles = {"default_stone.png"},
12 paramtype = "light",
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
17 node_box = {
18 type = "fixed",
19 fixed = {
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},
24 selection_box = {
25 type = "fixed",
26 fixed = {
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})
34 end,
35 on_rotate = "simple",
36 sounds = hades_sounds.node_sound_stone_defaults(),
39 minetest.register_node("travelnet:elevator_door_steel_closed", {
40 description = S("Stone Elevator Door"),
41 drawtype = "nodebox",
42 tiles = {"default_stone.png"},
43 paramtype = "light",
44 paramtype2 = "facedir",
45 is_ground_content = false,
46 groups = {cracky=2,oddly_breakable_by_hand=2},
47 node_box = {
48 type = "fixed",
49 fixed = {
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},
54 selection_box = {
55 type = "fixed",
56 fixed = {
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})
63 end,
64 on_rotate = "simple",
65 sounds = hades_sounds.node_sound_stone_defaults(),
68 minetest.register_node("travelnet:elevator_door_glass_open", {
69 description = S("Glass Elevator Door (open)"),
70 drawtype = "nodebox",
71 tiles = {"travelnet_elevator_door_glass.png"},
72 paramtype = "light",
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
77 node_box = {
78 type = "fixed",
79 fixed = {
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},
84 selection_box = {
85 type = "fixed",
86 fixed = {
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})
94 end,
95 on_rotate = "simple",
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"},
103 paramtype = "light",
104 paramtype2 = "facedir",
105 is_ground_content = false,
106 groups = {cracky=3,oddly_breakable_by_hand=3},
107 node_box = {
108 type = "fixed",
109 fixed = {
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},
114 selection_box = {
115 type = "fixed",
116 fixed = {
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})
123 end,
124 on_rotate = "simple",
125 sounds = hades_sounds.node_sound_glass_defaults(),
128 minetest.register_craft({
129 output = "travelnet:elevator_door_glass_closed",
130 recipe = {
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",
139 recipe = {
140 {"hades_core:stone", "", "hades_core:stone", },
141 {"hades_core:stone", "", "hades_core:stone", },
142 {"hades_core:stone", "", "hades_core:stone", }