From 86e083c40973d7c4d450546659571f964b4bfefa Mon Sep 17 00:00:00 2001
From: SmallJoker <mk939@ymail.com>
Date: Wed, 11 Jan 2023 20:43:06 +0100
Subject: [PATCH] Document a few derived textures

---
 technic_cnc/init.lua |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/technic_cnc/init.lua b/technic_cnc/init.lua
index afdb0b8..f1cb03b 100644
--- a/technic_cnc/init.lua
+++ b/technic_cnc/init.lua
@@ -2,10 +2,25 @@
 
 technic_cnc = {}
 
+technic_cnc.technic_modpath = minetest.get_modpath("technic")
+
+technic_cnc.use_technic = technic_cnc.technic_modpath
+                          and minetest.settings:get_bool("technic_cnc_use_technic") ~= false
+
 if rawget(_G, "intllib") then
 	technic_cnc.getter = intllib.Getter()
 else
-	technic_cnc.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
+	-- Intllib copypasta: TODO replace with the client-side translation API
+	technic_cnc.getter = function(s,a,...)
+		if a==nil then return s end
+		a={a,...}
+		return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e,o,n,c)
+			if e==""then
+				return a[tonumber(n)]..(o==""and c or"")
+			end
+			return "@"..o..n..c
+		end)
+	end
 end
 
 dofile(modpath.."/cnc.lua")

--
Gitblit v1.8.0