summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-11-30 20:45:38 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-11-30 20:45:38 -0500
commit3105ae7084552a512ddd4f90a5f454c044a135ca (patch)
tree31103252ba82dbf0fe138a1d7527c840274c6908
parentf12206acc6e3e6bf581cf9da97fcaf4c207acb2c (diff)
parentf479dd27d5dd916a8d532324c241d898f4976604 (diff)
downloadmesecons-3105ae7084552a512ddd4f90a5f454c044a135ca.tar
mesecons-3105ae7084552a512ddd4f90a5f454c044a135ca.tar.gz
mesecons-3105ae7084552a512ddd4f90a5f454c044a135ca.tar.bz2
mesecons-3105ae7084552a512ddd4f90a5f454c044a135ca.tar.xz
mesecons-3105ae7084552a512ddd4f90a5f454c044a135ca.zip
Merge branch 'master' of github.com:Jeija/minetest-mod-mesecons
-rw-r--r--mesecons_extrawires/vertical.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/mesecons_extrawires/vertical.lua b/mesecons_extrawires/vertical.lua
index 3274c1a..29b5cf6 100644
--- a/mesecons_extrawires/vertical.lua
+++ b/mesecons_extrawires/vertical.lua
@@ -33,24 +33,24 @@ local brules =
{x = 0, y = 1, z = 0}}
local vertical_updatepos = function (pos)
- local node = minetest.env:get_node(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.env:get_node(mesecon:addPosRule(pos, vrules[1]))
- local node_below = minetest.env:get_node(mesecon:addPosRule(pos, vrules[2]))
+ local node_above = minetest.get_node(mesecon:addPosRule(pos, vrules[1]))
+ local node_below = minetest.get_node(mesecon:addPosRule(pos, vrules[2]))
local namestate = minetest.registered_nodes[node.name].vertical_conductor_state
local above = minetest.registered_nodes[node_above.name] and minetest.registered_nodes[node_above.name].is_vertical_conductor
local below = minetest.registered_nodes[node_below.name] and minetest.registered_nodes[node_below.name].is_vertical_conductor
if above and below then -- above and below: vertical mesecon
- minetest.env:add_node(pos, {name = "mesecons_extrawires:vertical_"..namestate})
+ minetest.add_node(pos, {name = "mesecons_extrawires:vertical_"..namestate})
elseif above and not below then -- above only: bottom
- minetest.env:add_node(pos, {name = "mesecons_extrawires:vertical_bottom_"..namestate})
+ minetest.add_node(pos, {name = "mesecons_extrawires:vertical_bottom_"..namestate})
elseif not above and below then -- below only: top
- minetest.env:add_node(pos, {name = "mesecons_extrawires:vertical_top_"..namestate})
+ minetest.add_node(pos, {name = "mesecons_extrawires:vertical_top_"..namestate})
else -- no vertical wire above, no vertical wire below: use default wire
- minetest.env:add_node (pos, {name = "mesecons_extrawires:vertical_"..namestate})
+ minetest.add_node(pos, {name = "mesecons_extrawires:vertical_"..namestate})
end
end
end
@@ -79,7 +79,7 @@ minetest.register_node("mesecons_extrawires:vertical_on", {
offstate = "mesecons_extrawires:vertical_off",
rules = vrules
}},
- drop = {"mesecons_extrawires:vertical_off"},
+ drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update
})
@@ -123,7 +123,7 @@ minetest.register_node("mesecons_extrawires:vertical_top_on", {
offstate = "mesecons_extrawires:vertical_top_off",
rules = trules
}},
- drop = {"mesecons_extrawires:vertical_off"},
+ drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update
})
@@ -145,7 +145,7 @@ minetest.register_node("mesecons_extrawires:vertical_top_off", {
onstate = "mesecons_extrawires:vertical_top_on",
rules = trules
}},
- drop = {"mesecons_extrawires:vertical_off"},
+ drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update
})
@@ -167,7 +167,7 @@ minetest.register_node("mesecons_extrawires:vertical_bottom_on", {
offstate = "mesecons_extrawires:vertical_bottom_off",
rules = brules
}},
- drop = {"mesecons_extrawires:vertical_off"},
+ drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update
})
@@ -189,7 +189,7 @@ minetest.register_node("mesecons_extrawires:vertical_bottom_off", {
onstate = "mesecons_extrawires:vertical_bottom_on",
rules = brules
}},
- drop = {"mesecons_extrawires:vertical_off"},
+ drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update
})