2018-11-25 12:54:27 +01:00
|
|
|
local modpath = minetest.get_modpath("technic_cnc")
|
|
|
|
|
|
|
|
technic_cnc = {}
|
|
|
|
|
2018-11-25 14:13:56 +01:00
|
|
|
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
|
|
|
|
|
2018-11-25 12:54:27 +01:00
|
|
|
if rawget(_G, "intllib") then
|
|
|
|
technic_cnc.getter = intllib.Getter()
|
|
|
|
else
|
2022-06-06 21:04:13 +02:00
|
|
|
-- Intllib copypasta: TODO replace with the client-side translation API
|
2022-06-06 21:19:04 +02:00
|
|
|
technic_cnc.getter = function(s,a,...)
|
2022-06-06 21:04:13 +02:00
|
|
|
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
|
2018-11-25 12:54:27 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
dofile(modpath.."/cnc.lua")
|
|
|
|
dofile(modpath.."/cnc_api.lua")
|
|
|
|
dofile(modpath.."/cnc_materials.lua")
|