From 9b40d02fbd9e8c39c5c64cc7de89a7fe45382f04 Mon Sep 17 00:00:00 2001
From: SmallJoker <mk939@ymail.com>
Date: Sat, 04 Aug 2018 09:57:30 +0200
Subject: [PATCH] Revert get_3d to deprecated get3d for 0.4.x compatibility

---
 extranodes/init.lua |   84 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/extranodes/init.lua b/extranodes/init.lua
index 22a1d9f..eb54067 100644
--- a/extranodes/init.lua
+++ b/extranodes/init.lua
@@ -101,3 +101,87 @@
 	register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks")
 
 end
+
+local iclip_def = {
+	description = "Insulator/cable clip",
+	drawtype = "mesh",
+	mesh = "technic_insulator_clip.obj",
+	tiles = {"technic_insulator_clip.png"},
+	is_ground_content = false,
+	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1 },
+	sounds = default.node_sound_stone_defaults(),
+}
+
+local iclipfence_def = {
+	description = "Insulator/cable clip",
+	tiles = {"technic_insulator_clip.png"},
+	is_ground_content = false,
+	paramtype = "light",
+	drawtype = "nodebox",
+	node_box = {
+		type = "connected",
+		fixed = {
+			{ -0.25,   0.75,   -0.25,   0.25,   1.25,   0.25   }, -- the clip on top
+			{ -0.125, 0.6875, -0.125, 0.125, 0.75,   0.125 },
+			{ -0.1875,  0.625,  -0.1875,  0.1875,  0.6875, 0.1875  },
+			{ -0.125, 0.5625, -0.125, 0.125, 0.625,  0.125 },
+			{ -0.1875,  0.5,    -0.1875,  0.1875,  0.5625, 0.1875  },
+			{ -0.125, 0.4375, -0.125, 0.125, 0.5,    0.125 },
+			{ -0.1875,  0.375,  -0.1875,  0.1875,  0.4375, 0.1875  },
+			{ -0.125, -0.5,    -0.125,  0.125,  0.375,  0.125  }, -- the post, slightly short
+		},
+		-- connect_top =
+		-- connect_bottom =
+		connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8},
+			{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}},
+		connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16},
+			{-1/2,-5/16,-1/16,-1/8,-3/16,1/16}},
+		connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2},
+			{-1/16,-5/16,1/8,1/16,-3/16,1/2}},
+		connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16},
+			{1/8,-5/16,-1/16,1/2,-3/16,1/16}},
+	},
+	connects_to = {"group:fence", "group:wood", "group:tree"},
+	groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1 },
+	sounds = default.node_sound_stone_defaults(),
+}
+
+if minetest.get_modpath("unifieddyes") then
+	iclip_def.paramtype2 = "colorwallmounted"
+	iclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
+	iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
+		unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
+		unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
+	end
+	iclip_def.after_dig_node = unifieddyes.after_dig_node
+	iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
+
+	iclipfence_def.paramtype2 = "color"
+	iclipfence_def.palette = "unifieddyes_palette_extended.png"
+	iclipfence_def.on_construct = unifieddyes.on_construct
+	iclipfence_def.after_place_node = unifieddyes.recolor_on_place
+	iclipfence_def.after_dig_node = unifieddyes.after_dig_node
+	iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
+	iclipfence_def.place_param2 = 171 -- medium amber, low saturation, closest color to default:wood
+end
+
+minetest.register_node(":technic:insulator_clip", iclip_def)
+minetest.register_node(":technic:insulator_clip_fencepost", iclipfence_def)
+
+minetest.register_craft({
+	output = "technic:insulator_clip",
+	recipe = {
+		{ "", "dye:white", ""},
+		{ "", "technic:raw_latex", ""},
+		{ "technic:raw_latex", "default:stone", "technic:raw_latex"},
+	}
+})
+
+minetest.register_craft({
+	output = "technic:insulator_clip_fencepost 2",
+	recipe = {
+		{ "", "dye:white", ""},
+		{ "", "technic:raw_latex", ""},
+		{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
+	}
+})

--
Gitblit v1.8.0