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 |
|
a29644
|
30 |
stairsplus:register_all("technic", "granite_bricks", "technic:granite_bricks", { |
S |
31 |
description=S("Granite Bricks"), |
|
32 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
33 |
tiles={"technic_granite_bricks.png"}, |
|
34 |
}) |
|
35 |
|
cfd788
|
36 |
stairsplus:register_all("technic", "concrete", "technic:concrete", { |
1 |
37 |
description=S("Concrete"), |
|
38 |
groups={cracky=3, not_in_creative_inventory=1}, |
44cb8d
|
39 |
tiles={"basic_materials_concrete_block.png"}, |
cfd788
|
40 |
}) |
1d81e6
|
41 |
|
cfd788
|
42 |
stairsplus:register_all("technic", "zinc_block", "technic:zinc_block", { |
1 |
43 |
description=S("Zinc Block"), |
|
44 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
45 |
tiles={"technic_zinc_block.png"}, |
|
46 |
}) |
1d81e6
|
47 |
|
cfd788
|
48 |
stairsplus:register_all("technic", "cast_iron_block", "technic:cast_iron_block", { |
1 |
49 |
description=S("Cast Iron Block"), |
|
50 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
51 |
tiles={"technic_cast_iron_block.png"}, |
|
52 |
}) |
1d81e6
|
53 |
|
cfd788
|
54 |
stairsplus:register_all("technic", "carbon_steel_block", "technic:carbon_steel_block", { |
1 |
55 |
description=S("Carbon Steel Block"), |
|
56 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
57 |
tiles={"technic_carbon_steel_block.png"}, |
|
58 |
}) |
1d81e6
|
59 |
|
cfd788
|
60 |
stairsplus:register_all("technic", "stainless_steel_block", "technic:stainless_steel_block", { |
1 |
61 |
description=S("Stainless Steel Block"), |
|
62 |
groups={cracky=1, not_in_creative_inventory=1}, |
|
63 |
tiles={"technic_stainless_steel_block.png"}, |
|
64 |
}) |
1d81e6
|
65 |
|
0f6bdb
|
66 |
function register_technic_stairs_alias(origmod, origname, newmod, newname) |
S |
67 |
local func = minetest.register_alias |
|
68 |
local function remap(kind, suffix) |
|
69 |
-- Old: stairsplus:slab_concrete_wall |
|
70 |
-- New: technic:slab_concrete_wall |
|
71 |
func(("%s:%s_%s%s"):format(origmod, kind, origname, suffix), |
|
72 |
("%s:%s_%s%s"):format(newmod, kind, newname, suffix)) |
|
73 |
end |
|
74 |
|
|
75 |
-- Slabs |
|
76 |
remap("slab", "") |
|
77 |
remap("slab", "_inverted") |
|
78 |
remap("slab", "_wall") |
|
79 |
remap("slab", "_quarter") |
|
80 |
remap("slab", "_quarter_inverted") |
|
81 |
remap("slab", "_quarter_wall") |
|
82 |
remap("slab", "_three_quarter") |
|
83 |
remap("slab", "_three_quarter_inverted") |
|
84 |
remap("slab", "_three_quarter_wall") |
|
85 |
|
|
86 |
-- Stairs |
|
87 |
remap("stair", "") |
|
88 |
remap("stair", "_inverted") |
|
89 |
remap("stair", "_wall") |
|
90 |
remap("stair", "_wall_half") |
|
91 |
remap("stair", "_wall_half_inverted") |
|
92 |
remap("stair", "_half") |
|
93 |
remap("stair", "_half_inverted") |
|
94 |
remap("stair", "_right_half") |
|
95 |
remap("stair", "_right_half_inverted") |
|
96 |
remap("stair", "_inner") |
|
97 |
remap("stair", "_inner_inverted") |
|
98 |
remap("stair", "_outer") |
|
99 |
remap("stair", "_outer_inverted") |
|
100 |
|
|
101 |
-- Other |
|
102 |
remap("panel", "_bottom") |
|
103 |
remap("panel", "_top") |
|
104 |
remap("panel", "_vertical") |
|
105 |
remap("micro", "_bottom") |
|
106 |
remap("micro", "_top") |
4f78a6
|
107 |
end |
cfd788
|
108 |
|
1 |
109 |
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete") |
|
110 |
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") |
|
111 |
register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") |
|
112 |
register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks") |
|
113 |
|
|
114 |
end |
938255
|
115 |
|
018d66
|
116 |
local iclip_def = { |
92dd0f
|
117 |
description = S("Insulator/cable clip"), |
018d66
|
118 |
drawtype = "mesh", |
VE |
119 |
mesh = "technic_insulator_clip.obj", |
|
120 |
tiles = {"technic_insulator_clip.png"}, |
|
121 |
is_ground_content = false, |
|
122 |
groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 }, |
|
123 |
sounds = default.node_sound_stone_defaults(), |
|
124 |
} |
8b222b
|
125 |
|
018d66
|
126 |
local iclipfence_def = { |
92dd0f
|
127 |
description = S("Insulator/cable clip"), |
018d66
|
128 |
tiles = {"technic_insulator_clip.png"}, |
VE |
129 |
is_ground_content = false, |
|
130 |
paramtype = "light", |
|
131 |
drawtype = "nodebox", |
|
132 |
node_box = { |
|
133 |
type = "connected", |
|
134 |
fixed = { |
|
135 |
{ -0.25, 0.75, -0.25, 0.25, 1.25, 0.25 }, -- the clip on top |
|
136 |
{ -0.125, 0.6875, -0.125, 0.125, 0.75, 0.125 }, |
|
137 |
{ -0.1875, 0.625, -0.1875, 0.1875, 0.6875, 0.1875 }, |
|
138 |
{ -0.125, 0.5625, -0.125, 0.125, 0.625, 0.125 }, |
|
139 |
{ -0.1875, 0.5, -0.1875, 0.1875, 0.5625, 0.1875 }, |
|
140 |
{ -0.125, 0.4375, -0.125, 0.125, 0.5, 0.125 }, |
|
141 |
{ -0.1875, 0.375, -0.1875, 0.1875, 0.4375, 0.1875 }, |
|
142 |
{ -0.125, -0.5, -0.125, 0.125, 0.375, 0.125 }, -- the post, slightly short |
8b222b
|
143 |
}, |
018d66
|
144 |
-- connect_top = |
VE |
145 |
-- connect_bottom = |
|
146 |
connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8}, |
|
147 |
{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}}, |
|
148 |
connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16}, |
|
149 |
{-1/2,-5/16,-1/16,-1/8,-3/16,1/16}}, |
|
150 |
connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2}, |
|
151 |
{-1/16,-5/16,1/8,1/16,-3/16,1/2}}, |
|
152 |
connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16}, |
|
153 |
{1/8,-5/16,-1/16,1/2,-3/16,1/16}}, |
|
154 |
}, |
|
155 |
connects_to = {"group:fence", "group:wood", "group:tree"}, |
|
156 |
groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 }, |
|
157 |
sounds = default.node_sound_stone_defaults(), |
|
158 |
} |
8b222b
|
159 |
|
92dd0f
|
160 |
local sclip_tex = { |
VD |
161 |
"technic_insulator_clip.png", |
769654
|
162 |
{ name = "strut.png^technic_steel_strut_overlay.png", color = "white" }, |
92dd0f
|
163 |
{ name = "strut.png", color = "white" } |
VD |
164 |
} |
|
165 |
|
|
166 |
local streetsmod = minetest.get_modpath("streets") or minetest.get_modpath ("steelsupport") |
|
167 |
-- cheapie's fork breaks it into several individual mods, with differernt names for the same content. |
|
168 |
|
|
169 |
if streetsmod then |
|
170 |
sclip_tex = { |
|
171 |
"technic_insulator_clip.png", |
|
172 |
{ name = "streets_support.png^technic_steel_strut_overlay.png", color = "white" }, |
|
173 |
{ name = "streets_support.png", color = "white" } |
|
174 |
} |
|
175 |
end |
|
176 |
|
|
177 |
local sclip_def = { |
|
178 |
description = S("Steel strut with insulator/cable clip"), |
|
179 |
drawtype = "mesh", |
|
180 |
mesh = "technic_steel_strut_with_insulator_clip.obj", |
|
181 |
tiles = sclip_tex, |
|
182 |
paramtype = "light", |
|
183 |
paramtype2 = "wallmounted", |
|
184 |
is_ground_content = false, |
|
185 |
sounds = default.node_sound_stone_defaults(), |
|
186 |
groups = { choppy=1, cracky=1 }, |
|
187 |
backface_culling = false |
|
188 |
} |
|
189 |
|
2a7dbe
|
190 |
if minetest.get_modpath("unifieddyes") then |
018d66
|
191 |
iclip_def.paramtype2 = "colorwallmounted" |
VE |
192 |
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png" |
600fc6
|
193 |
iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing) |
VE |
194 |
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) |
|
195 |
end |
018d66
|
196 |
iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1} |
d1bf38
|
197 |
iclip_def.on_dig = unifieddyes.on_dig |
3ba535
|
198 |
|
018d66
|
199 |
iclipfence_def.paramtype2 = "color" |
VE |
200 |
iclipfence_def.palette = "unifieddyes_palette_extended.png" |
|
201 |
iclipfence_def.on_construct = unifieddyes.on_construct |
|
202 |
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1} |
d1bf38
|
203 |
iclipfence_def.on_dig = unifieddyes.on_dig |
92dd0f
|
204 |
|
VD |
205 |
sclip_def.paramtype2 = "colorwallmounted" |
|
206 |
sclip_def.palette = "unifieddyes_palette_colorwallmounted.png" |
|
207 |
sclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing) |
|
208 |
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) |
|
209 |
end |
d1bf38
|
210 |
sclip_def.on_dig = unifieddyes.on_dig |
92dd0f
|
211 |
sclip_def.groups = {choppy=1, cracky=1, ud_param2_colorable = 1} |
0ad801
|
212 |
end |
018d66
|
213 |
|
2a7dbe
|
214 |
minetest.register_node(":technic:insulator_clip", iclip_def) |
VE |
215 |
minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def) |
|
216 |
|
018d66
|
217 |
minetest.register_craft({ |
VE |
218 |
output = "technic:insulator_clip", |
|
219 |
recipe = { |
|
220 |
{ "", "dye:white", ""}, |
|
221 |
{ "", "technic:raw_latex", ""}, |
|
222 |
{ "technic:raw_latex", "default:stone", "technic:raw_latex"}, |
|
223 |
} |
|
224 |
}) |
|
225 |
|
|
226 |
minetest.register_craft({ |
|
227 |
output = "technic:insulator_clip_fencepost 2", |
|
228 |
recipe = { |
|
229 |
{ "", "dye:white", ""}, |
|
230 |
{ "", "technic:raw_latex", ""}, |
|
231 |
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"}, |
|
232 |
} |
|
233 |
}) |
92dd0f
|
234 |
|
VD |
235 |
local steelmod = minetest.get_modpath("steel") |
|
236 |
|
f5bf0d
|
237 |
if streetsmod or steelmod then |
G |
238 |
minetest.register_node(":technic:steel_strut_with_insulator_clip", sclip_def) |
92dd0f
|
239 |
|
f5bf0d
|
240 |
if steelmod then |
G |
241 |
minetest.register_craft({ |
|
242 |
output = "technic:steel_strut_with_insulator_clip", |
|
243 |
recipe = { |
|
244 |
{"technic:insulator_clip_fencepost"}, |
|
245 |
{"steel:strut_mount"} |
|
246 |
} |
|
247 |
}) |
92dd0f
|
248 |
|
f5bf0d
|
249 |
minetest.register_craft({ |
G |
250 |
output = "technic:steel_strut_with_insulator_clip", |
|
251 |
recipe = { |
|
252 |
{"technic:insulator_clip_fencepost", "" }, |
|
253 |
{"steel:strut", "default:steel_ingot" }, |
|
254 |
} |
|
255 |
}) |
92dd0f
|
256 |
|
f5bf0d
|
257 |
elseif streetsmod then |
G |
258 |
minetest.register_craft({ |
|
259 |
output = "technic:steel_strut_with_insulator_clip", |
|
260 |
recipe = { |
|
261 |
{"technic:insulator_clip_fencepost", "" }, |
|
262 |
{"streets:steel_support", "default:steel_ingot" }, |
|
263 |
} |
|
264 |
}) |
|
265 |
end |
92dd0f
|
266 |
end |
29f746
|
267 |
|
VD |
268 |
if minetest.get_modpath("unifieddyes") then |
|
269 |
|
|
270 |
unifieddyes.register_color_craft({ |
|
271 |
output = "technic:insulator_clip_fencepost", |
|
272 |
palette = "extended", |
|
273 |
type = "shapeless", |
|
274 |
neutral_node = "technic:insulator_clip_fencepost", |
|
275 |
recipe = { |
|
276 |
"NEUTRAL_NODE", |
|
277 |
"MAIN_DYE" |
|
278 |
} |
|
279 |
}) |
|
280 |
|
|
281 |
unifieddyes.register_color_craft({ |
|
282 |
output = "technic:insulator_clip", |
|
283 |
palette = "wallmounted", |
|
284 |
type = "shapeless", |
|
285 |
neutral_node = "technic:insulator_clip", |
|
286 |
recipe = { |
|
287 |
"NEUTRAL_NODE", |
|
288 |
"MAIN_DYE" |
|
289 |
} |
|
290 |
}) |
|
291 |
|
92dd0f
|
292 |
unifieddyes.register_color_craft({ |
VD |
293 |
output = "technic:steel_strut_with_insulator_clip", |
|
294 |
palette = "wallmounted", |
|
295 |
type = "shapeless", |
|
296 |
neutral_node = "", |
|
297 |
recipe = { |
|
298 |
"technic:steel_strut_with_insulator_clip", |
|
299 |
"MAIN_DYE" |
|
300 |
} |
|
301 |
}) |
|
302 |
|
|
303 |
if steelmod then |
|
304 |
unifieddyes.register_color_craft({ |
|
305 |
output = "technic:steel_strut_with_insulator_clip", |
|
306 |
palette = "wallmounted", |
|
307 |
neutral_node = "", |
|
308 |
recipe = { |
|
309 |
{ "technic:insulator_clip_fencepost", "MAIN_DYE" }, |
|
310 |
{ "steel:strut_mount", "" }, |
|
311 |
} |
|
312 |
}) |
|
313 |
end |
|
314 |
|
|
315 |
if streetsmod then |
|
316 |
unifieddyes.register_color_craft({ |
|
317 |
output = "technic:steel_strut_with_insulator_clip", |
|
318 |
palette = "wallmounted", |
|
319 |
neutral_node = "technic:steel_strut_with_insulator_clip", |
|
320 |
recipe = { |
|
321 |
{ "technic:insulator_clip_fencepost", "MAIN_DYE" }, |
|
322 |
{ "streets:steel_support", "default:steel_ingot" }, |
|
323 |
} |
|
324 |
}) |
|
325 |
end |
29f746
|
326 |
end |