diff options
Diffstat (limited to 'mesecons_mvps')
-rw-r--r-- | mesecons_mvps/depends.txt | 1 | ||||
-rw-r--r-- | mesecons_mvps/init.lua | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mesecons_mvps/depends.txt b/mesecons_mvps/depends.txt new file mode 100644 index 0000000..acaa924 --- /dev/null +++ b/mesecons_mvps/depends.txt @@ -0,0 +1 @@ +mesecons diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua new file mode 100644 index 0000000..150f59f --- /dev/null +++ b/mesecons_mvps/init.lua @@ -0,0 +1,25 @@ +--register stoppers for movestones/pistons + +mesecon.mvps_stoppers={} + +function mesecon:is_mvps_stopper(nodename) + local i=1 + repeat + i=i+1 + if mesecon.mvps_stoppers[i]==nodename then return true end + until mesecon.mvps_stoppers[i]==nil + return false +end + +function mesecon:register_mvps_stopper(nodename) + local i=1 + repeat + i=i+1 + if mesecon.mvps_stoppers[i]==nil then break end + until false + mesecon.mvps_stoppers[i]=nodename +end + +mesecon:register_mvps_stopper("default:chest") +mesecon:register_mvps_stopper("default:chest_locked") +mesecon:register_mvps_stopper("default:furnace") |