diff options
author | 1F616EMO <root@1f616emo.xyz> | 2025-08-12 14:22:24 +0800 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-08-19 22:03:52 +0200 |
commit | 82a5c5bc5dfce87d3021c5d55b89b2ff94e77341 (patch) | |
tree | 25e8ceb31c1dc4537bb9fda63a81ca32a2178556 /advtrains_luaautomation/active_common.lua | |
parent | a7d3dda9d282ab08b5a70f78510e36825cc981bb (diff) | |
download | advtrains-82a5c5bc5dfce87d3021c5d55b89b2ff94e77341.tar.gz advtrains-82a5c5bc5dfce87d3021c5d55b89b2ff94e77341.tar.bz2 advtrains-82a5c5bc5dfce87d3021c5d55b89b2ff94e77341.zip |
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.
Diffstat (limited to 'advtrains_luaautomation/active_common.lua')
-rw-r--r-- | advtrains_luaautomation/active_common.lua | 5 |
1 files changed, 5 insertions, 0 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) |