diff options
author | orwell <orwell@bleipb.de> | 2025-08-26 22:28:57 +0200 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-08-26 22:28:57 +0200 |
commit | 75d6bff12419431e05e184bb9d06bb5b66ba3ebd (patch) | |
tree | fc0c5c18b421c5ffdf5c139773f4416070601826 /advtrains_luaautomation | |
parent | 136c520d77c32c5f145da24d3fbdd3769e186cdf (diff) | |
parent | 382f4204e0dba9503661fcd1c9d7c0dfa6fe001b (diff) | |
download | advtrains-75d6bff12419431e05e184bb9d06bb5b66ba3ebd.tar.gz advtrains-75d6bff12419431e05e184bb9d06bb5b66ba3ebd.tar.bz2 advtrains-75d6bff12419431e05e184bb9d06bb5b66ba3ebd.zip |
Merge branch 'master' into timetable
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r-- | advtrains_luaautomation/active_common.lua | 5 | ||||
-rw-r--r-- | advtrains_luaautomation/atc_rail.lua | 2 | ||||
-rw-r--r-- | advtrains_luaautomation/init.lua | 2 | ||||
-rw-r--r-- | advtrains_luaautomation/settingtypes.txt | 2 |
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 |