diff options
Diffstat (limited to 'mario/portal.lua')
-rw-r--r-- | mario/portal.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mario/portal.lua b/mario/portal.lua index 1ff31ee..6bee29b 100644 --- a/mario/portal.lua +++ b/mario/portal.lua @@ -9,8 +9,8 @@ minetest.register_node("mario:portal", { walkable = false, is_ground_content = false, groups = {cracky = 2,not_in_creative_inventory=1}, - on_player_collision = function(pos, player, gameid) - player:setpos({x=pos.x,y=pos.y+12,z=pos.z}) + on_turtle_collision = function(pos, obj, gameid) + obj:setpos({x=pos.x,y=pos.y+12,z=pos.z}) end }) minetest.register_node("mario:portal_left", { @@ -25,6 +25,9 @@ minetest.register_node("mario:portal_left", { groups = {cracky = 2,not_in_creative_inventory=0}, on_player_collision = function(pos, player, gameid) player:setpos(vector.add(pos,{x=31, y=0, z=0})) + end, + on_turtle_collision = function(pos, obj, gameid) + obj:setpos(vector.add(pos,{x=31, y=0, z=0})) end }) minetest.register_node("mario:portal_right", { @@ -39,5 +42,8 @@ minetest.register_node("mario:portal_right", { groups = {cracky = 2,not_in_creative_inventory=0}, on_player_collision = function(pos, player, gameid) player:setpos(vector.add(pos,{x=-31, y=0, z=0})) + end, + on_turtle_collision = function(pos, obj, gameid) + obj:setpos(vector.add(pos,{x=31, y=0, z=0})) end }) |