SmallJoker
2022-06-06 0f6bdb1bde5f476b8e4500cba559f813cd5276a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local modpath = minetest.get_modpath("technic_cnc")
 
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
    -- Intllib copypasta: TODO replace with the client-side translation API
    technic.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")
dofile(modpath.."/cnc_api.lua")
dofile(modpath.."/cnc_materials.lua")