aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/environment.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:30:50 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:30:50 +0200
commit38d10acca24e5a34671a1a71f12923002d06253d (patch)
treea72aa02902af4dd37bbfa753bdb1ef651e72be88 /advtrains_luaautomation/environment.lua
parent3e29cba6af2e19909b6d143cecaec877aaf3a7bd (diff)
parent8d8e8c1553bc631b8f357005b506bc651de9a138 (diff)
downloadadvtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.gz
advtrains-38d10acca24e5a34671a1a71f12923002d06253d.tar.bz2
advtrains-38d10acca24e5a34671a1a71f12923002d06253d.zip
Merge branch 'master' of https://github.com/orwell96/advtrains
Diffstat (limited to 'advtrains_luaautomation/environment.lua')
-rw-r--r--advtrains_luaautomation/environment.lua5
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