SmallJoker
2023-01-11 86e083c40973d7c4d450546659571f964b4bfefa
commit | author | age
dc0689 1 local modpath = minetest.get_modpath("technic_cnc")
VD 2
3 technic_cnc = {}
4
d40946 5 technic_cnc.technic_modpath = minetest.get_modpath("technic")
VD 6
7 technic_cnc.use_technic = technic_cnc.technic_modpath
8                           and minetest.settings:get_bool("technic_cnc_use_technic") ~= false
9
dc0689 10 if rawget(_G, "intllib") then
VD 11     technic_cnc.getter = intllib.Getter()
12 else
0f6bdb 13     -- Intllib copypasta: TODO replace with the client-side translation API
349676 14     technic_cnc.getter = function(s,a,...)
0f6bdb 15         if a==nil then return s end
S 16         a={a,...}
17         return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e,o,n,c)
18             if e==""then
19                 return a[tonumber(n)]..(o==""and c or"")
20             end
21             return "@"..o..n..c
22         end)
23     end
dc0689 24 end
VD 25
26 dofile(modpath.."/cnc.lua")
27 dofile(modpath.."/cnc_api.lua")
28 dofile(modpath.."/cnc_materials.lua")