diff options
Diffstat (limited to 'advtrains_luaautomation/init.lua')
-rw-r--r-- | advtrains_luaautomation/init.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua index ab625b1..b359142 100644 --- a/advtrains_luaautomation/init.lua +++ b/advtrains_luaautomation/init.lua @@ -2,18 +2,20 @@ -- Lua automation features for advtrains -- Uses global table 'atlatc' (AdvTrains_LuaATC) ---TODO: re-add localization (if merging localization, discard this hunk please) -atltrans = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end +atltrans = attrans +local S = atltrans --Privilege --Only trusted players should be enabled to build stuff which can break the server. atlatc = { envs = {}} -minetest.register_privilege("atlatc", { description = "Player can place and modify LUA ATC components. Grant with care! Allows to execute bad LUA code.", give_to_singleplayer = false, default= false }) +minetest.register_privilege("atlatc", { description = S("Can place and configure LuaATC components, including execute potentially harmful Lua code"), give_to_singleplayer = false, default= false }) --Size of code input forms in X,Y notation. Must be at least 10x10 atlatc.CODE_FORM_SIZE = "15,12" +--Position of Error Label in Code Form +atlatc.CODE_FORM_ERRLABELPOS = "0,12" --assertt helper. error if a variable is not of a type function assertt(var, typ) @@ -31,6 +33,9 @@ dofile(mp.."/interrupt.lua") dofile(mp.."/active_common.lua") dofile(mp.."/atc_rail.lua") dofile(mp.."/operation_panel.lua") +if mesecon then + dofile(mp.."/mesecon_controller.lua") +end dofile(mp.."/pcnaming.lua") dofile(mp.."/chatcmds.lua") |