aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/active_common.lua2
-rw-r--r--advtrains_luaautomation/init.lua3
-rw-r--r--advtrains_luaautomation/pcnaming.lua2
3 files changed, 4 insertions, 3 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua
index c17c6e9..48f75ac 100644
--- a/advtrains_luaautomation/active_common.lua
+++ b/advtrains_luaautomation/active_common.lua
@@ -36,7 +36,7 @@ function ac.getform(pos, meta_p)
end
local sel = 1
for n,_ in pairs(atlatc.envs) do
- envs_asvalues[#envs_asvalues+1]=n
+ envs_asvalues[#envs_asvalues+1]=minetest.formspec_escape(n)
if n==env then
sel=#envs_asvalues
end
diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua
index 75cf30a..573a553 100644
--- a/advtrains_luaautomation/init.lua
+++ b/advtrains_luaautomation/init.lua
@@ -44,7 +44,8 @@ local filename=minetest.get_worldpath().."/advtrains_luaautomation"
function atlatc.load()
local file, err = io.open(filename, "r")
if not file then
- minetest.log("error", " Failed to read advtrains_luaautomation save data from file "..filename..": "..(err or "Unknown Error"))
+ minetest.log("warning", " Failed to read advtrains_luaautomation save data from file "..filename..": "..(err or "Unknown Error"))
+ minetest.log("warning", " (this is normal when first enabling advtrains on this world)")
else
atprint("luaautomation reading file:",filename)
local tbl = minetest.deserialize(file:read("*a"))
diff --git a/advtrains_luaautomation/pcnaming.lua b/advtrains_luaautomation/pcnaming.lua
index 427585d..ebb769f 100644
--- a/advtrains_luaautomation/pcnaming.lua
+++ b/advtrains_luaautomation/pcnaming.lua
@@ -52,7 +52,7 @@ minetest.register_craftitem("advtrains_luaautomation:pcnaming",{
pn=name
end
end
- minetest.show_formspec(pname, "atlatc_naming_"..minetest.pos_to_string(pos), "field[pn;Set name of component (empty to clear);"..pn.."]")
+ minetest.show_formspec(pname, "atlatc_naming_"..minetest.pos_to_string(pos), "field[pn;Set name of component (empty to clear);"..minetest.formspec_escape(pn).."]")
end
end
end,