diff options
author | orwell96 <orwell@bleipb.de> | 2018-04-25 17:14:03 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-04-25 17:14:03 +0200 |
commit | 1feae7a1ea35fd8f4f3495d1bf65f8180bb0f720 (patch) | |
tree | c4119c0cee9d2aaa0d6daf462391ea519e8345d1 /advtrains_luaautomation/environment.lua | |
parent | 8b576357ef1d2346e9af112e115ac92a5f4d222d (diff) | |
download | advtrains-1feae7a1ea35fd8f4f3495d1bf65f8180bb0f720.tar.gz advtrains-1feae7a1ea35fd8f4f3495d1bf65f8180bb0f720.tar.bz2 advtrains-1feae7a1ea35fd8f4f3495d1bf65f8180bb0f720.zip |
Add digiline interface and is_passive function to LuaATC
Diffstat (limited to 'advtrains_luaautomation/environment.lua')
-rw-r--r-- | advtrains_luaautomation/environment.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua index 0b25e87..52d36a4 100644 --- a/advtrains_luaautomation/environment.lua +++ b/advtrains_luaautomation/environment.lua @@ -86,7 +86,7 @@ local function safe_string_find(...) end local mp=minetest.get_modpath("advtrains_luaautomation") -local p_api_getstate, p_api_setstate = dofile(mp.."/passive.lua") +local p_api_getstate, p_api_setstate, p_api_is_passive = dofile(mp.."/passive.lua") local static_env = { --core LUA functions @@ -150,7 +150,8 @@ local static_env = { POS = function(x,y,z) return {x=x, y=y, z=z} end, getstate = p_api_getstate, setstate = p_api_setstate, - --interrupts are handled per node, position unknown. + is_passive = p_api_is_passive, + --interrupts are handled per node, position unknown. (same goes for digilines) --however external interrupts can be set here. interrupt_pos = function(pos, imesg) if not type(pos)=="table" or not pos.x or not pos.y or not pos.z then |