summaryrefslogtreecommitdiff
path: root/mesecons_movestones
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-12-31 18:32:46 +0100
committerJeija <norrepli@gmail.com>2012-12-31 18:32:46 +0100
commitec07fc27d7ef76114fd977283c36a20afe26f13f (patch)
treee8eab0fd457abdd33adaebbd46c4cf77e2fefd1c /mesecons_movestones
parent5921f6d46caa18310435046a22d5aa0f529998f0 (diff)
parent52ddd4bdc931a1f806ea581002b0f39ba83158bc (diff)
downloadmesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar
mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.gz
mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.bz2
mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.tar.xz
mesecons-ec07fc27d7ef76114fd977283c36a20afe26f13f.zip
Merge branch 'nextgen'
Conflicts: mesecons/wires.lua
Diffstat (limited to 'mesecons_movestones')
-rw-r--r--mesecons_movestones/init.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesecons_movestones/init.lua b/mesecons_movestones/init.lua
index a7e5f2c..91b57c7 100644
--- a/mesecons_movestones/init.lua
+++ b/mesecons_movestones/init.lua
@@ -70,7 +70,7 @@ minetest.register_node("mesecons_movestones:movestone", {
repeat -- Check if it collides with a stopper
collpos = mesecon:addPosRule(collpos, direction)
checknode=minetest.env:get_node(collpos)
- if mesecon:is_mvps_stopper(checknode.name) then
+ if mesecon:is_mvps_stopper(checknode.name, direction) then
return
end
until checknode.name=="air"
@@ -97,7 +97,7 @@ minetest.register_entity("mesecons_movestones:movestone_entity", {
on_step = function(self, dtime)
local pos = self.object:getpos()
- local direction=mesecon:get_movestone_direction(pos)
+ local direction = mesecon:get_movestone_direction(pos)
if not direction then
minetest.env:add_node(pos, {name="mesecons_movestones:movestone"})
@@ -105,9 +105,9 @@ minetest.register_entity("mesecons_movestones:movestone_entity", {
return
end
- self.object:setvelocity({x=direction.x*3, y=direction.y*3, z=direction.z*3})
+ self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2})
- mesecon:mvps_push(pos, direction)
+ mesecon:mvps_push(pos, direction, 100)
end,
})
@@ -140,7 +140,7 @@ minetest.register_node("mesecons_movestones:sticky_movestone", {
repeat -- Check if it collides with a stopper
collpos = mesecon:addPosRule(collpos, direction)
checknode=minetest.env:get_node(collpos)
- if mesecon:is_mvps_stopper(checknode.name) then
+ if mesecon:is_mvps_stopper(checknode.name, direction) then
return
end
until checknode.name=="air"
@@ -149,7 +149,7 @@ minetest.register_node("mesecons_movestones:sticky_movestone", {
repeat -- Check if it collides with a stopper (pull direction)
collpos={x=collpos.x-direction.x, y=collpos.y-direction.y, z=collpos.z-direction.z}
checknode=minetest.env:get_node(collpos)
- if mesecon:is_mvps_stopper(checknode.name) then
+ if mesecon:is_mvps_stopper(checknode.name, direction) then
return
end
until checknode.name=="air"
@@ -192,9 +192,9 @@ minetest.register_entity("mesecons_movestones:sticky_movestone_entity", {
return
end
- self.object:setvelocity({x=direction.x*3, y=direction.y*3, z=direction.z*3})
+ self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2})
- mesecon:mvps_push(pos, direction)
+ mesecon:mvps_push(pos, direction, 100)
--STICKY
mesecon:mvps_pull_all(pos, direction)