aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/active_common.lua14
-rw-r--r--advtrains_luaautomation/atc_rail.lua4
-rw-r--r--advtrains_luaautomation/init.lua2
-rw-r--r--advtrains_luaautomation/operation_panel.lua2
4 files changed, 12 insertions, 10 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua
index 0eb687c..50fb2bc 100644
--- a/advtrains_luaautomation/active_common.lua
+++ b/advtrains_luaautomation/active_common.lua
@@ -14,7 +14,7 @@ end
function ac.after_place_node(pos, player)
local meta=minetest.get_meta(pos)
meta:set_string("formspec", ac.getform(pos, meta))
- meta:set_string("infotext", "LuaAutomation component, unconfigured.")
+ meta:set_string("infotext", "LuaATC component, unconfigured.")
local ph=minetest.pos_to_string(pos)
--just get first available key!
for en,_ in pairs(atlatc.envs) do
@@ -48,7 +48,7 @@ function ac.getform(pos, meta_p)
.."button[5,0.2;2,1;save;Save]"
.."button[7,0.2;3,1;cle;Clear Local Env.]"
.."textarea[0.3,1.5;"..atlatc.CODE_FORM_SIZE..";code;Code;"..minetest.formspec_escape(code).."]"
- .."label[0,9.7;"..err.."]"
+ .."label["..atlatc.CODE_FORM_ERRLABELPOS..";"..err.."]"
return form
end
@@ -91,9 +91,9 @@ function ac.on_receive_fields(pos, formname, fields, player)
meta:set_string("formspec", ac.getform(pos, meta))
if nodetbl.env then
- meta:set_string("infotext", "LuaAutomation component, assigned to environment '"..nodetbl.env.."'")
+ meta:set_string("infotext", "LuaATC component, assigned to environment '"..nodetbl.env.."'")
else
- meta:set_string("infotext", "LuaAutomation component, invalid enviroment set!")
+ meta:set_string("infotext", "LuaATC component, invalid enviroment set!")
end
end
@@ -101,7 +101,7 @@ function ac.run_in_env(pos, evtdata, customfct_p, ignore_no_code)
local ph=minetest.pos_to_string(pos)
local nodetbl = ac.nodes[ph]
if not nodetbl then
- atwarn("LuaAutomation component at",ph,": Data not in memory! Please visit component and click 'Save'!")
+ atwarn("LuaATC component at",ph,": Data not in memory! Please visit component and click 'Save'!")
return
end
@@ -111,13 +111,13 @@ function ac.run_in_env(pos, evtdata, customfct_p, ignore_no_code)
end
if not nodetbl.env or not atlatc.envs[nodetbl.env] then
- atwarn("LuaAutomation component at",ph,": Not an existing environment: "..(nodetbl.env or "<nil>"))
+ atwarn("LuaATC component at",ph,": Not an existing environment: "..(nodetbl.env or "<nil>"))
return false
end
local env = atlatc.envs[nodetbl.env]
if not nodetbl.code or nodetbl.code=="" then
if not ignore_no_code then
- env:log("warning", "LuaAutomation component at",ph,": No code to run! (insert -- to suppress warning)")
+ env:log("warning", "LuaATC component at",ph,": No code to run! (insert -- to suppress warning)")
end
return false
end
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index b862129..bfd7357 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -14,7 +14,7 @@ function r.fire_event(pos, evtdata, appr_internal)
local railtbl = atlatc.active.nodes[ph]
if not railtbl then
- atwarn("LuaAutomation ATC interface rail at",ph,": Data not in memory! Please visit position and click 'Save'!")
+ atwarn("LuaATC interface rail at",ph,": Data not in memory! Please visit position and click 'Save'!")
return
end
@@ -188,7 +188,7 @@ advtrains.register_tracks("default", {
models_prefix="advtrains_dtrack",
models_suffix=".b3d",
shared_texture="advtrains_dtrack_shared_atc.png",
- description=atltrans("LuaAutomation ATC Rail"),
+ description=atltrans("LuaATC Rail"),
formats={},
get_additional_definiton = function(def, preset, suffix, rotation)
return {
diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua
index 8b951e9..2aa2acb 100644
--- a/advtrains_luaautomation/init.lua
+++ b/advtrains_luaautomation/init.lua
@@ -14,6 +14,8 @@ minetest.register_privilege("atlatc", { description = "Player can place and modi
--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)
diff --git a/advtrains_luaautomation/operation_panel.lua b/advtrains_luaautomation/operation_panel.lua
index f8b93b5..bfbbda4 100644
--- a/advtrains_luaautomation/operation_panel.lua
+++ b/advtrains_luaautomation/operation_panel.lua
@@ -7,7 +7,7 @@ end
minetest.register_node("advtrains_luaautomation:oppanel", {
drawtype = "normal",
tiles={"atlatc_oppanel.png"},
- description = "LuaAutomation operation panel",
+ description = "LuaATC operation panel",
groups = {
cracky = 1,
save_in_at_nodedb=1,