aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/active_common.lua5
-rw-r--r--advtrains_luaautomation/atc_rail.lua2
-rw-r--r--advtrains_luaautomation/init.lua2
-rw-r--r--advtrains_luaautomation/settingtypes.txt2
4 files changed, 8 insertions, 3 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua
index d0ae2a4..da0a99b 100644
--- a/advtrains_luaautomation/active_common.lua
+++ b/advtrains_luaautomation/active_common.lua
@@ -146,6 +146,11 @@ function ac.run_in_env(pos, evtdata, customfct_p, ignore_no_code)
customfct.clear_interrupts=function()
atlatc.interrupt.clear_ints_at_pos(pos)
end
+ customfct.atc_pos = {
+ x = pos.x,
+ y = pos.y,
+ z = pos.z,
+ }
-- add digiline_send function, if digiline is loaded
if minetest.global_exists("digiline") then
customfct.digiline_send=function(channel, msg)
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 594de5c..4706fdf 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -106,7 +106,7 @@ function r.fire_event(pos, evtdata, appr_internal)
get_fc_index = function()
if not train_id then return end
local fc_index_list = {}
- for widx, wagon_id in ipars(train.trainparts) do
+ for widx, wagon_id in ipairs(train.trainparts) do
fc_index_list[widx] = advtrains.wagons[wagon_id].fcind or 1
end
return fc_index_list
diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua
index 753340d..1947993 100644
--- a/advtrains_luaautomation/init.lua
+++ b/advtrains_luaautomation/init.lua
@@ -46,7 +46,7 @@ dofile(mp.."/pcnaming.lua")
dofile(mp.."/chatcmds.lua")
-if minetest.settings:get_bool("advtrains_luaautomation_enable_atlac_recipes",false) == true then
+if minetest.settings:get_bool("advtrains_luaautomation_enable_luaatc_recipes",false) == true then
dofile(mp.."/recipes.lua")
end
diff --git a/advtrains_luaautomation/settingtypes.txt b/advtrains_luaautomation/settingtypes.txt
index 20ed52e..641254a 100644
--- a/advtrains_luaautomation/settingtypes.txt
+++ b/advtrains_luaautomation/settingtypes.txt
@@ -1,2 +1,2 @@
# Enable or disable craft recipes for LuaATC components
-advtrains_luaautomation_enable_atlac_recipes (Enable LuaATC component craft recipes) bool true \ No newline at end of file
+advtrains_luaautomation_enable_luaatc_recipes (Enable LuaATC component craft recipes) bool true