From 768fbecc641325eedcca6f1abcf5d1aec4a7e4f1 Mon Sep 17 00:00:00 2001
From: d-stephane <d-stephane@users.noreply.github.com>
Date: Mon, 26 Aug 2019 19:53:24 +0200
Subject: [PATCH] Add french translation (#417)

---
 technic/machines/register/machine_base.lua |   53 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/technic/machines/register/machine_base.lua b/technic/machines/register/machine_base.lua
index a0dcea7..15fb8ea 100644
--- a/technic/machines/register/machine_base.lua
+++ b/technic/machines/register/machine_base.lua
@@ -2,6 +2,7 @@
 local S = technic.getter
 
 local fs_helpers = pipeworks.fs_helpers
+local tube_entry = "^pipeworks_tube_connection_metallic.png"
 
 local tube = {
 	insert_object = function(pos, node, stack, direction)
@@ -43,7 +44,7 @@
 	for k, v in pairs(groups) do active_groups[k] = v end
 
 	local formspec =
-		"invsize[8,9;]"..
+		"size[8,9;]"..
 		"list[current_name;src;"..(4-input_size)..",1;"..input_size..",1;]"..
 		"list[current_name;dst;5,1;2,2;]"..
 		"list[current_player;main;0,5;8,4;]"..
@@ -139,13 +140,18 @@
 		end
 	end
 
+	local tentry = tube_entry
+	if ltier == "lv" then
+		tentry = ""
+	end
 	minetest.register_node("technic:"..ltier.."_"..machine_name, {
 		description = machine_desc:format(tier),
-		tiles = {"technic_"..ltier.."_"..machine_name.."_top.png", 
-			"technic_"..ltier.."_"..machine_name.."_bottom.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
+		tiles = {
+			"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
 			"technic_"..ltier.."_"..machine_name.."_front.png"
 		},
 		paramtype2 = "facedir",
@@ -162,13 +168,13 @@
 			if not string.find(node.name, ":lv_") then
 				form_buttons = fs_helpers.cycling_button(
 					meta,
-					"image_button[0,4.3;1,0.6",
+					pipeworks.button_base,
 					"splitstacks",
 					{
-						{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
-						{text="", texture="pipeworks_button_on.png",  addopts="false;false;pipeworks_button_interm.png"}
+						pipeworks.button_off,
+						pipeworks.button_on
 					}
-				).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
+				)..pipeworks.button_label
 			end
 
 			meta:set_string("infotext", machine_desc:format(tier))
@@ -196,13 +202,13 @@
 			if not string.find(node.name, ":lv_") then
 				form_buttons = fs_helpers.cycling_button(
 					meta,
-					"image_button[0,4.3;1,0.6",
+					pipeworks.button_base,
 					"splitstacks",
 					{
-						{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
-						{text="", texture="pipeworks_button_on.png",  addopts="false;false;pipeworks_button_interm.png"}
+						pipeworks.button_off,
+						pipeworks.button_on
 					}
-				).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
+				)..pipeworks.button_label
 			end
 			meta:set_string("formspec", formspec..form_buttons)
 		end,
@@ -210,11 +216,12 @@
 
 	minetest.register_node("technic:"..ltier.."_"..machine_name.."_active",{
 		description = machine_desc:format(tier),
-		tiles = {"technic_"..ltier.."_"..machine_name.."_top.png",
-			"technic_"..ltier.."_"..machine_name.."_bottom.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
-			"technic_"..ltier.."_"..machine_name.."_side.png",
+		tiles = {
+			"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
+			"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
 			"technic_"..ltier.."_"..machine_name.."_front_active.png"
 		},
 		paramtype2 = "facedir",
@@ -239,13 +246,13 @@
 			if not string.find(node.name, ":lv_") then
 				form_buttons = fs_helpers.cycling_button(
 					meta,
-					"image_button[0,4.3;1,0.6",
+					pipeworks.button_base,
 					"splitstacks",
 					{
-						{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
-						{text="", texture="pipeworks_button_on.png",  addopts="false;false;pipeworks_button_interm.png"}
+						pipeworks.button_off,
+						pipeworks.button_on
 					}
-				).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
+				)..pipeworks.button_label
 			end
 			meta:set_string("formspec", formspec..form_buttons)
 		end,

--
Gitblit v1.8.0