diff options
author | Jeija <norrepli@gmail.com> | 2016-02-14 20:55:50 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2016-02-14 20:55:50 +0100 |
commit | 809192f353af2faeb779df85104d4d7ed8d8943d (patch) | |
tree | bf01d4afac6b7bd29deb0af92a7f7677ca6021c0 /mesecons_extrawires/vertical.lua | |
parent | 6b54f025c16f29bd8049d5664b53d6ff6c30ce55 (diff) |
Use vector helper functions instead of old builtin cmpPos and addPosRule functions
Diffstat (limited to 'mesecons_extrawires/vertical.lua')
-rw-r--r-- | mesecons_extrawires/vertical.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesecons_extrawires/vertical.lua b/mesecons_extrawires/vertical.lua index cac2ae2..b1d0405 100644 --- a/mesecons_extrawires/vertical.lua +++ b/mesecons_extrawires/vertical.lua @@ -42,8 +42,8 @@ local vertical_updatepos = function (pos) local node = minetest.get_node(pos) if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].is_vertical_conductor then - local node_above = minetest.get_node(mesecon.addPosRule(pos, vertical_rules[1])) - local node_below = minetest.get_node(mesecon.addPosRule(pos, vertical_rules[2])) + local node_above = minetest.get_node(vector.add(pos, vertical_rules[1])) + local node_below = minetest.get_node(vector.add(pos, vertical_rules[2])) local namestate = minetest.registered_nodes[node.name].vertical_conductor_state local above = minetest.registered_nodes[node_above.name] @@ -67,8 +67,8 @@ end local vertical_update = function (pos, node) vertical_updatepos(pos) -- this one - vertical_updatepos(mesecon.addPosRule(pos, vertical_rules[1])) -- above - vertical_updatepos(mesecon.addPosRule(pos, vertical_rules[2])) -- below + vertical_updatepos(vector.add(pos, vertical_rules[1])) -- above + vertical_updatepos(vector.add(pos, vertical_rules[2])) -- below end -- Vertical wire |