From 82a5c5bc5dfce87d3021c5d55b89b2ff94e77341 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Tue, 12 Aug 2025 14:22:24 +0800 Subject: Add atc_pos to give information about where the LuaATC component is Adds an atc_pos table for getting the LuaATC component's coordinates. Useful to generate unique ID for LuaATC components, e.g. train position checkpoints. --- advtrains_luaautomation/active_common.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'advtrains_luaautomation') 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) -- cgit v1.2.3