1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
-- A do-nothing "structural" node, to ensure all digtron nodes that are supposed to be connected to each other can be connected to each other.
minetest.register_node("digtron:structure", {
description = "Digtron Structure",
_doc_items_longdesc = digtron.doc.structure_longdesc,
_doc_items_usagehelp = digtron.doc.structure_usagehelp,
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
drop = "digtron:structure",
tiles = {"digtron_plate.png"},
drawtype = "nodebox",
sounds = digtron.metal_sounds,
climbable = true,
walkable = false,
paramtype = "light",
is_ground_content = false,
node_box = {
type = "fixed",
fixed = {
{0.3125, 0.3125, -0.5, 0.5, 0.5, 0.5},
{0.3125, -0.5, -0.5, 0.5, -0.3125, 0.5},
{-0.5, 0.3125, -0.5, -0.3125, 0.5, 0.5},
{-0.5, -0.5, -0.5, -0.3125, -0.3125, 0.5},
{-0.3125, 0.3125, 0.3125, 0.3125, 0.5, 0.5},
{-0.3125, -0.5, 0.3125, 0.3125, -0.3125, 0.5},
{-0.5, -0.3125, 0.3125, -0.3125, 0.3125, 0.5},
{0.3125, -0.3125, 0.3125, 0.5, 0.3125, 0.5},
{-0.5, -0.3125, -0.5, -0.3125, 0.3125, -0.3125},
{0.3125, -0.3125, -0.5, 0.5, 0.3125, -0.3125},
{-0.3125, 0.3125, -0.5, 0.3125, 0.5, -0.3125},
{-0.3125, -0.5, -0.5, 0.3125, -0.3125, -0.3125},
}
},
})
-- A modest light source that will move with the digtron, handy for working in a tunnel you aren't bothering to install permanent lights in.
minetest.register_node("digtron:light", {
description = "Digtron Light",
_doc_items_longdesc = digtron.doc.light_longdesc,
_doc_items_usagehelp = digtron.doc.light_usagehelp,
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
drop = "digtron:light",
tiles = {"digtron_plate.png^digtron_light.png"},
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
light_source = 10,
sounds = default.node_sound_glass_defaults(),
paramtype2 = "wallmounted",
node_box = {
type = "wallmounted",
wall_top = {-0.25, 0.3125, -0.25, 0.25, 0.5, 0.25},
wall_bottom = {-0.25, -0.3125, -0.25, 0.25, -0.5, 0.25},
wall_side = {-0.5, -0.25, -0.25, -0.1875, 0.25, 0.25},
},
})
-- A simple structural panel
minetest.register_node("digtron:panel", {
description = "Digtron Panel",
_doc_items_longdesc = digtron.doc.panel_longdesc,
_doc_items_usagehelp = digtron.doc.panel_usagehelp,
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
drop = "digtron:panel",
tiles = {"digtron_plate.png"},
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
sounds = digtron.metal_sounds,
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
},
collision_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
},
})
-- A simple structural panel
minetest.register_node("digtron:edge_panel", {
description = "Digtron Edge Panel",
_doc_items_longdesc = digtron.doc.edge_panel_longdesc,
_doc_items_usagehelp = digtron.doc.edge_panel_usagehelp,
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
drop = "digtron:edge_panel",
tiles = {"digtron_plate.png"},
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
sounds = digtron.metal_sounds,
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.375}
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.4375}
},
},
})
minetest.register_node("digtron:corner_panel", {
description = "Digtron Corner Panel",
_doc_items_longdesc = digtron.doc.corner_panel_longdesc,
_doc_items_usagehelp = digtron.doc.corner_panel_usagehelp,
groups = {cracky = 3, oddly_breakable_by_hand=3, digtron = 1},
drop = "digtron:corner_panel",
tiles = {"digtron_plate.png"},
drawtype = "nodebox",
paramtype = "light",
is_ground_content = false,
sounds = digtron.metal_sounds,
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.375},
{-0.5, -0.375, -0.5, -0.375, 0.5, 0.375},
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.4375},
{-0.5, -0.4375, -0.5, -0.4375, 0.5, 0.4375},
},
},
})
|