diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-05-10 18:28:57 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-05-10 18:28:57 -0400 |
commit | d4dddc41ec199ffc73f1ad10f900b42c3164a46f (patch) | |
tree | e2d61bc3a91a9042499279ed09179c3f1cd2f67c /autoplace.lua | |
parent | 509fac3845cc06b5b1673d9516fd998265058298 (diff) |
add flow sensor. Sends mesecons signal when water is flowing through it.
Diffstat (limited to 'autoplace.lua')
-rw-r--r-- | autoplace.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/autoplace.lua b/autoplace.lua index dbcc423..ddfdb76 100644 --- a/autoplace.lua +++ b/autoplace.lua @@ -143,6 +143,28 @@ function pipes_scansurroundings(pos) pzp=1 end +-- ...flow sensors... + + if (string.find(nxm.name, "pipeworks:flow_sensor") ~= nil) + and (nxm.param2 == 0 or nxm.param2 == 2) then + pxm=1 + end + + if (string.find(nxp.name, "pipeworks:flow_sensor") ~= nil) + and (nxp.param2 == 0 or nxp.param2 == 2) then + pxp=1 + end + + if (string.find(nzm.name, "pipeworks:flow_sensor") ~= nil) + and (nzm.param2 == 1 or nzm.param2 == 3) then + pzm=1 + end + + if (string.find(nzp.name, "pipeworks:flow_sensor") ~= nil) + and (nzp.param2 == 1 or nzp.param2 == 3) then + pzp=1 + end + -- ...spigots... if (string.find(nxm.name, "pipeworks:spigot") ~= nil) |