diff options
author | orwell96 <orwell@bleipb.de> | 2018-08-16 19:18:03 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-08-16 19:18:03 +0200 |
commit | 05cb6090ac9537650a900b64768bf3ed959cebed (patch) | |
tree | 11b7e3ab4bb846ab069fc10832b07cb36d6eb6dd /advtrains_luaautomation/environment.lua | |
parent | 5fad61e9c981115a183527ffe58a7bbe26fea4e7 (diff) | |
download | advtrains-05cb6090ac9537650a900b64768bf3ed959cebed.tar.gz advtrains-05cb6090ac9537650a900b64768bf3ed959cebed.tar.bz2 advtrains-05cb6090ac9537650a900b64768bf3ed959cebed.zip |
Move passive API to the advtrains core
to remove dependency of interlocking on luaautomation
Diffstat (limited to 'advtrains_luaautomation/environment.lua')
-rw-r--r-- | advtrains_luaautomation/environment.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua index 52d36a4..65d5700 100644 --- a/advtrains_luaautomation/environment.lua +++ b/advtrains_luaautomation/environment.lua @@ -86,7 +86,6 @@ local function safe_string_find(...) end local mp=minetest.get_modpath("advtrains_luaautomation") -local p_api_getstate, p_api_setstate, p_api_is_passive = dofile(mp.."/passive.lua") local static_env = { --core LUA functions @@ -148,12 +147,13 @@ local static_env = { date = safe_date, }, POS = function(x,y,z) return {x=x, y=y, z=z} end, - getstate = p_api_getstate, - setstate = p_api_setstate, - is_passive = p_api_is_passive, + getstate = advtrains.getstate, + setstate = advtrains.setstate, + is_passive = advtrains.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) + interrupt_pos = function(parpos, imesg) + local pos=atlatc.pcnaming.resolve_pos(parpos) if not type(pos)=="table" or not pos.x or not pos.y or not pos.z then debug.sethook() error("Invalid position supplied to interrupt_pos") |