diff options
author | Jeija <norrepli@gmail.com> | 2012-03-05 19:21:26 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-03-05 19:21:26 +0100 |
commit | 36ae0cc1a54538742f1d1f3709bb2c1840a33539 (patch) | |
tree | 2865e2f7240108c0b82e45ef7c2f8e4a833929ba /mesecons_mvps | |
parent | f8ac52c35073875e2ba1872532577c27f9677c3d (diff) |
Upload after major code reorganization - Version 0.6 DEV - Split mesecons mod into several modules - [BUGGY?]
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") |