summaryrefslogtreecommitdiff
path: root/extranodes/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'extranodes/init.lua')
-rw-r--r--extranodes/init.lua107
1 files changed, 105 insertions, 2 deletions
diff --git a/extranodes/init.lua b/extranodes/init.lua
index f6ab93a..1f65c29 100644
--- a/extranodes/init.lua
+++ b/extranodes/init.lua
@@ -103,7 +103,7 @@ if minetest.get_modpath("moreblocks") then
end
local iclip_def = {
- description = "Insulator/cable clip",
+ description = S("Insulator/cable clip"),
drawtype = "mesh",
mesh = "technic_insulator_clip.obj",
tiles = {"technic_insulator_clip.png"},
@@ -113,7 +113,7 @@ local iclip_def = {
}
local iclipfence_def = {
- description = "Insulator/cable clip",
+ description = S("Insulator/cable clip"),
tiles = {"technic_insulator_clip.png"},
is_ground_content = false,
paramtype = "light",
@@ -146,6 +146,36 @@ local iclipfence_def = {
sounds = default.node_sound_stone_defaults(),
}
+local sclip_tex = {
+ "technic_insulator_clip.png",
+ { name = "strut.png^steel_strut_overlay.png", color = "white" },
+ { name = "strut.png", color = "white" }
+}
+
+local streetsmod = minetest.get_modpath("streets") or minetest.get_modpath ("steelsupport")
+-- cheapie's fork breaks it into several individual mods, with differernt names for the same content.
+
+if streetsmod then
+ sclip_tex = {
+ "technic_insulator_clip.png",
+ { name = "streets_support.png^technic_steel_strut_overlay.png", color = "white" },
+ { name = "streets_support.png", color = "white" }
+ }
+end
+
+local sclip_def = {
+ description = S("Steel strut with insulator/cable clip"),
+ drawtype = "mesh",
+ mesh = "technic_steel_strut_with_insulator_clip.obj",
+ tiles = sclip_tex,
+ paramtype = "light",
+ paramtype2 = "wallmounted",
+ is_ground_content = false,
+ sounds = default.node_sound_stone_defaults(),
+ groups = { choppy=1, cracky=1 },
+ backface_culling = false
+}
+
if minetest.get_modpath("unifieddyes") then
iclip_def.paramtype2 = "colorwallmounted"
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
@@ -158,10 +188,18 @@ if minetest.get_modpath("unifieddyes") then
iclipfence_def.palette = "unifieddyes_palette_extended.png"
iclipfence_def.on_construct = unifieddyes.on_construct
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
+
+ sclip_def.paramtype2 = "colorwallmounted"
+ sclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
+ sclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
+ unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+ end
+ sclip_def.groups = {choppy=1, cracky=1, ud_param2_colorable = 1}
end
minetest.register_node(":technic:insulator_clip", iclip_def)
minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def)
+minetest.register_node(":technic:steel_strut_with_insulator_clip", sclip_def)
minetest.register_craft({
output = "technic:insulator_clip",
@@ -181,6 +219,37 @@ minetest.register_craft({
}
})
+local steelmod = minetest.get_modpath("steel")
+
+if steelmod then
+ minetest.register_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ recipe = {
+ {"technic:insulator_clip_fencepost"},
+ {"steel:strut_mount"}
+ }
+ })
+
+ minetest.register_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ recipe = {
+ {"technic:insulator_clip_fencepost", "" },
+ {"steel:strut", "default:steel_ingot" },
+ }
+ })
+
+end
+
+if streetsmod then
+ minetest.register_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ recipe = {
+ {"technic:insulator_clip_fencepost", "" },
+ {"streets:steel_support", "default:steel_ingot" },
+ }
+ })
+end
+
if minetest.get_modpath("unifieddyes") then
unifieddyes.register_color_craft({
@@ -205,4 +274,38 @@ if minetest.get_modpath("unifieddyes") then
}
})
+ unifieddyes.register_color_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ palette = "wallmounted",
+ type = "shapeless",
+ neutral_node = "",
+ recipe = {
+ "technic:steel_strut_with_insulator_clip",
+ "MAIN_DYE"
+ }
+ })
+
+ if steelmod then
+ unifieddyes.register_color_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ palette = "wallmounted",
+ neutral_node = "",
+ recipe = {
+ { "technic:insulator_clip_fencepost", "MAIN_DYE" },
+ { "steel:strut_mount", "" },
+ }
+ })
+ end
+
+ if streetsmod then
+ unifieddyes.register_color_craft({
+ output = "technic:steel_strut_with_insulator_clip",
+ palette = "wallmounted",
+ neutral_node = "technic:steel_strut_with_insulator_clip",
+ recipe = {
+ { "technic:insulator_clip_fencepost", "MAIN_DYE" },
+ { "streets:steel_support", "default:steel_ingot" },
+ }
+ })
+ end
end