commit | author | age
|
0ca19d
|
1 |
-- Minetest 0.4.6 mod: extranodes |
R |
2 |
-- namespace: technic |
39c41a
|
3 |
-- Boilerplate to support localized strings if intllib mod is installed. |
41a10a
|
4 |
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end |
0ca19d
|
5 |
|
cfd788
|
6 |
if minetest.get_modpath("moreblocks") then |
1d81e6
|
7 |
|
cfd788
|
8 |
-- register stairsplus/circular_saw nodes |
1 |
9 |
-- we skip blast resistant concrete and uranium intentionally |
|
10 |
-- chrome seems to be too hard of a metal to be actually sawable |
0ca19d
|
11 |
|
cfd788
|
12 |
stairsplus:register_all("technic", "marble", "technic:marble", { |
1 |
13 |
description=S("Marble"), |
|
14 |
groups={cracky=3, not_in_creative_inventory=1}, |
|
15 |
tiles={"technic_marble.png"}, |
|
16 |
}) |
0ca19d
|
17 |
|
cfd788
|
18 |
stairsplus:register_all("technic", "marble_bricks", "technic:marble_bricks", { |
1 |
19 |
description=S("Marble Bricks"), |
|
20 |
groups={cracky=3, not_in_creative_inventory=1}, |
|
21 |
tiles={"technic_marble_bricks.png"}, |
|
22 |
}) |
0ca19d
|
23 |
|
cfd788
|
24 |
stairsplus:register_all("technic", "granite", "technic:granite", { |
1 |
25 |
description=S("Granite"), |
|
26 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
27 |
tiles={"technic_granite.png"}, |
|
28 |
}) |
994d40
|
29 |
|
cfd788
|
30 |
stairsplus:register_all("technic", "concrete", "technic:concrete", { |
1 |
31 |
description=S("Concrete"), |
|
32 |
groups={cracky=3, not_in_creative_inventory=1}, |
44cb8d
|
33 |
tiles={"basic_materials_concrete_block.png"}, |
cfd788
|
34 |
}) |
1d81e6
|
35 |
|
cfd788
|
36 |
stairsplus:register_all("technic", "zinc_block", "technic:zinc_block", { |
1 |
37 |
description=S("Zinc Block"), |
|
38 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
39 |
tiles={"technic_zinc_block.png"}, |
|
40 |
}) |
1d81e6
|
41 |
|
cfd788
|
42 |
stairsplus:register_all("technic", "cast_iron_block", "technic:cast_iron_block", { |
1 |
43 |
description=S("Cast Iron Block"), |
|
44 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
45 |
tiles={"technic_cast_iron_block.png"}, |
|
46 |
}) |
1d81e6
|
47 |
|
cfd788
|
48 |
stairsplus:register_all("technic", "carbon_steel_block", "technic:carbon_steel_block", { |
1 |
49 |
description=S("Carbon Steel Block"), |
|
50 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
51 |
tiles={"technic_carbon_steel_block.png"}, |
|
52 |
}) |
1d81e6
|
53 |
|
cfd788
|
54 |
stairsplus:register_all("technic", "stainless_steel_block", "technic:stainless_steel_block", { |
1 |
55 |
description=S("Stainless Steel Block"), |
|
56 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
57 |
tiles={"technic_stainless_steel_block.png"}, |
|
58 |
}) |
1d81e6
|
59 |
|
44cb8d
|
60 |
stairsplus:register_all("technic", "brass_block", "basic_materials:brass_block", { |
cfd788
|
61 |
description=S("Brass Block"), |
1 |
62 |
groups={cracky=1, not_in_creative_inventory=1}, |
44cb8d
|
63 |
tiles={"basic_materials_brass_block.png"}, |
cfd788
|
64 |
}) |
994d40
|
65 |
|
cfd788
|
66 |
function register_technic_stairs_alias(modname, origname, newmod, newname) |
1 |
67 |
minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname) |
|
68 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted") |
|
69 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", newmod..":slab_" .. newname .. "_wall") |
|
70 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", newmod..":slab_" .. newname .. "_quarter") |
|
71 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", newmod..":slab_" .. newname .. "_quarter_inverted") |
|
72 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", newmod..":slab_" .. newname .. "_quarter_wall") |
|
73 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", newmod..":slab_" .. newname .. "_three_quarter") |
|
74 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", newmod..":slab_" .. newname .. "_three_quarter_inverted") |
|
75 |
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", newmod..":slab_" .. newname .. "_three_quarter_wall") |
|
76 |
minetest.register_alias(modname .. ":stair_" .. origname, newmod..":stair_" .. newname) |
|
77 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", newmod..":stair_" .. newname .. "_inverted") |
|
78 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", newmod..":stair_" .. newname .. "_wall") |
|
79 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") |
|
80 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") |
|
81 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_half", newmod..":stair_" .. newname .. "_half") |
|
82 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", newmod..":stair_" .. newname .. "_half_inverted") |
|
83 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", newmod..":stair_" .. newname .. "_right_half") |
|
84 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", newmod..":stair_" .. newname .. "_right_half_inverted") |
|
85 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") |
|
86 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") |
|
87 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", newmod..":stair_" .. newname .. "_inner") |
|
88 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", newmod..":stair_" .. newname .. "_inner_inverted") |
|
89 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", newmod..":stair_" .. newname .. "_outer") |
|
90 |
minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", newmod..":stair_" .. newname .. "_outer_inverted") |
|
91 |
minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", newmod..":panel_" .. newname .. "_bottom") |
|
92 |
minetest.register_alias(modname .. ":panel_" .. origname .. "_top", newmod..":panel_" .. newname .. "_top") |
|
93 |
minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical") |
|
94 |
minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom") |
|
95 |
minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top") |
|
96 |
end |
|
97 |
|
|
98 |
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete") |
|
99 |
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") |
|
100 |
register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") |
|
101 |
register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks") |
|
102 |
|
|
103 |
end |
938255
|
104 |
|
018d66
|
105 |
local iclip_def = { |
92dd0f
|
106 |
description = S("Insulator/cable clip"), |
018d66
|
107 |
drawtype = "mesh", |
VE |
108 |
mesh = "technic_insulator_clip.obj", |
|
109 |
tiles = {"technic_insulator_clip.png"}, |
|
110 |
is_ground_content = false, |
|
111 |
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 }, |
|
112 |
sounds = default.node_sound_stone_defaults(), |
|
113 |
} |
8b222b
|
114 |
|
018d66
|
115 |
local iclipfence_def = { |
92dd0f
|
116 |
description = S("Insulator/cable clip"), |
018d66
|
117 |
tiles = {"technic_insulator_clip.png"}, |
VE |
118 |
is_ground_content = false, |
|
119 |
paramtype = "light", |
|
120 |
drawtype = "nodebox", |
|
121 |
node_box = { |
|
122 |
type = "connected", |
|
123 |
fixed = { |
|
124 |
{ -0.25, 0.75, -0.25, 0.25, 1.25, 0.25 }, -- the clip on top |
|
125 |
{ -0.125, 0.6875, -0.125, 0.125, 0.75, 0.125 }, |
|
126 |
{ -0.1875, 0.625, -0.1875, 0.1875, 0.6875, 0.1875 }, |
|
127 |
{ -0.125, 0.5625, -0.125, 0.125, 0.625, 0.125 }, |
|
128 |
{ -0.1875, 0.5, -0.1875, 0.1875, 0.5625, 0.1875 }, |
|
129 |
{ -0.125, 0.4375, -0.125, 0.125, 0.5, 0.125 }, |
|
130 |
{ -0.1875, 0.375, -0.1875, 0.1875, 0.4375, 0.1875 }, |
|
131 |
{ -0.125, -0.5, -0.125, 0.125, 0.375, 0.125 }, -- the post, slightly short |
8b222b
|
132 |
}, |
018d66
|
133 |
-- connect_top = |
VE |
134 |
-- connect_bottom = |
|
135 |
connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8}, |
|
136 |
{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}}, |
|
137 |
connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16}, |
|
138 |
{-1/2,-5/16,-1/16,-1/8,-3/16,1/16}}, |
|
139 |
connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2}, |
|
140 |
{-1/16,-5/16,1/8,1/16,-3/16,1/2}}, |
|
141 |
connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16}, |
|
142 |
{1/8,-5/16,-1/16,1/2,-3/16,1/16}}, |
|
143 |
}, |
|
144 |
connects_to = {"group:fence", "group:wood", "group:tree"}, |
|
145 |
groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 }, |
|
146 |
sounds = default.node_sound_stone_defaults(), |
|
147 |
} |
8b222b
|
148 |
|
92dd0f
|
149 |
local sclip_tex = { |
VD |
150 |
"technic_insulator_clip.png", |
|
151 |
{ name = "strut.png^steel_strut_overlay.png", color = "white" }, |
|
152 |
{ name = "strut.png", color = "white" } |
|
153 |
} |
|
154 |
|
|
155 |
local streetsmod = minetest.get_modpath("streets") or minetest.get_modpath ("steelsupport") |
|
156 |
-- cheapie's fork breaks it into several individual mods, with differernt names for the same content. |
|
157 |
|
|
158 |
if streetsmod then |
|
159 |
sclip_tex = { |
|
160 |
"technic_insulator_clip.png", |
|
161 |
{ name = "streets_support.png^technic_steel_strut_overlay.png", color = "white" }, |
|
162 |
{ name = "streets_support.png", color = "white" } |
|
163 |
} |
|
164 |
end |
|
165 |
|
|
166 |
local sclip_def = { |
|
167 |
description = S("Steel strut with insulator/cable clip"), |
|
168 |
drawtype = "mesh", |
|
169 |
mesh = "technic_steel_strut_with_insulator_clip.obj", |
|
170 |
tiles = sclip_tex, |
|
171 |
paramtype = "light", |
|
172 |
paramtype2 = "wallmounted", |
|
173 |
is_ground_content = false, |
|
174 |
sounds = default.node_sound_stone_defaults(), |
|
175 |
groups = { choppy=1, cracky=1 }, |
|
176 |
backface_culling = false |
|
177 |
} |
|
178 |
|
2a7dbe
|
179 |
if minetest.get_modpath("unifieddyes") then |
018d66
|
180 |
iclip_def.paramtype2 = "colorwallmounted" |
VE |
181 |
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png" |
600fc6
|
182 |
iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing) |
VE |
183 |
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) |
|
184 |
end |
018d66
|
185 |
iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1} |
3ba535
|
186 |
|
018d66
|
187 |
iclipfence_def.paramtype2 = "color" |
VE |
188 |
iclipfence_def.palette = "unifieddyes_palette_extended.png" |
|
189 |
iclipfence_def.on_construct = unifieddyes.on_construct |
|
190 |
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1} |
92dd0f
|
191 |
|
VD |
192 |
sclip_def.paramtype2 = "colorwallmounted" |
|
193 |
sclip_def.palette = "unifieddyes_palette_colorwallmounted.png" |
|
194 |
sclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing) |
|
195 |
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) |
|
196 |
end |
|
197 |
sclip_def.groups = {choppy=1, cracky=1, ud_param2_colorable = 1} |
0ad801
|
198 |
end |
018d66
|
199 |
|
2a7dbe
|
200 |
minetest.register_node(":technic:insulator_clip", iclip_def) |
VE |
201 |
minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def) |
92dd0f
|
202 |
minetest.register_node(":technic:steel_strut_with_insulator_clip", sclip_def) |
2a7dbe
|
203 |
|
018d66
|
204 |
minetest.register_craft({ |
VE |
205 |
output = "technic:insulator_clip", |
|
206 |
recipe = { |
|
207 |
{ "", "dye:white", ""}, |
|
208 |
{ "", "technic:raw_latex", ""}, |
|
209 |
{ "technic:raw_latex", "default:stone", "technic:raw_latex"}, |
|
210 |
} |
|
211 |
}) |
|
212 |
|
|
213 |
minetest.register_craft({ |
|
214 |
output = "technic:insulator_clip_fencepost 2", |
|
215 |
recipe = { |
|
216 |
{ "", "dye:white", ""}, |
|
217 |
{ "", "technic:raw_latex", ""}, |
|
218 |
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"}, |
|
219 |
} |
|
220 |
}) |
92dd0f
|
221 |
|
VD |
222 |
local steelmod = minetest.get_modpath("steel") |
|
223 |
|
|
224 |
if steelmod then |
|
225 |
minetest.register_craft({ |
|
226 |
output = "technic:steel_strut_with_insulator_clip", |
|
227 |
recipe = { |
|
228 |
{"technic:insulator_clip_fencepost"}, |
|
229 |
{"steel:strut_mount"} |
|
230 |
} |
|
231 |
}) |
|
232 |
|
|
233 |
minetest.register_craft({ |
|
234 |
output = "technic:steel_strut_with_insulator_clip", |
|
235 |
recipe = { |
|
236 |
{"technic:insulator_clip_fencepost", "" }, |
|
237 |
{"steel:strut", "default:steel_ingot" }, |
|
238 |
} |
|
239 |
}) |
|
240 |
|
|
241 |
end |
|
242 |
|
|
243 |
if streetsmod then |
|
244 |
minetest.register_craft({ |
|
245 |
output = "technic:steel_strut_with_insulator_clip", |
|
246 |
recipe = { |
|
247 |
{"technic:insulator_clip_fencepost", "" }, |
|
248 |
{"streets:steel_support", "default:steel_ingot" }, |
|
249 |
} |
|
250 |
}) |
|
251 |
end |
29f746
|
252 |
|
VD |
253 |
if minetest.get_modpath("unifieddyes") then |
|
254 |
|
|
255 |
unifieddyes.register_color_craft({ |
|
256 |
output = "technic:insulator_clip_fencepost", |
|
257 |
palette = "extended", |
|
258 |
type = "shapeless", |
|
259 |
neutral_node = "technic:insulator_clip_fencepost", |
|
260 |
recipe = { |
|
261 |
"NEUTRAL_NODE", |
|
262 |
"MAIN_DYE" |
|
263 |
} |
|
264 |
}) |
|
265 |
|
|
266 |
unifieddyes.register_color_craft({ |
|
267 |
output = "technic:insulator_clip", |
|
268 |
palette = "wallmounted", |
|
269 |
type = "shapeless", |
|
270 |
neutral_node = "technic:insulator_clip", |
|
271 |
recipe = { |
|
272 |
"NEUTRAL_NODE", |
|
273 |
"MAIN_DYE" |
|
274 |
} |
|
275 |
}) |
|
276 |
|
92dd0f
|
277 |
unifieddyes.register_color_craft({ |
VD |
278 |
output = "technic:steel_strut_with_insulator_clip", |
|
279 |
palette = "wallmounted", |
|
280 |
type = "shapeless", |
|
281 |
neutral_node = "", |
|
282 |
recipe = { |
|
283 |
"technic:steel_strut_with_insulator_clip", |
|
284 |
"MAIN_DYE" |
|
285 |
} |
|
286 |
}) |
|
287 |
|
|
288 |
if steelmod then |
|
289 |
unifieddyes.register_color_craft({ |
|
290 |
output = "technic:steel_strut_with_insulator_clip", |
|
291 |
palette = "wallmounted", |
|
292 |
neutral_node = "", |
|
293 |
recipe = { |
|
294 |
{ "technic:insulator_clip_fencepost", "MAIN_DYE" }, |
|
295 |
{ "steel:strut_mount", "" }, |
|
296 |
} |
|
297 |
}) |
|
298 |
end |
|
299 |
|
|
300 |
if streetsmod then |
|
301 |
unifieddyes.register_color_craft({ |
|
302 |
output = "technic:steel_strut_with_insulator_clip", |
|
303 |
palette = "wallmounted", |
|
304 |
neutral_node = "technic:steel_strut_with_insulator_clip", |
|
305 |
recipe = { |
|
306 |
{ "technic:insulator_clip_fencepost", "MAIN_DYE" }, |
|
307 |
{ "streets:steel_support", "default:steel_ingot" }, |
|
308 |
} |
|
309 |
}) |
|
310 |
end |
29f746
|
311 |
end |