diff options
author | DonBatman <serfdon@gmail.com> | 2015-10-26 12:48:12 -0700 |
---|---|---|
committer | DonBatman <serfdon@gmail.com> | 2015-10-26 12:48:12 -0700 |
commit | a9b9c4a94d8c4da128284b3de7626b7078680514 (patch) | |
tree | 9b41be76f41a843feae53e313688c985b0719513 /mario/portal.lua | |
parent | a593cc543219453baee971860072d286f4c2c24c (diff) |
new pacmine schems
added mario
Diffstat (limited to 'mario/portal.lua')
-rw-r--r-- | mario/portal.lua | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/mario/portal.lua b/mario/portal.lua new file mode 100644 index 0000000..1c61d8d --- /dev/null +++ b/mario/portal.lua @@ -0,0 +1,76 @@ +minetest.register_node("mario:portal", { + description = "Portal", + drawtype = "glasslike", + tiles = {"mario_glass.png"}, + paramtype = "light", + sunlight_propagates = true, + alpha = 150, + paramtype2 = "facedir", + walkable = false, + is_ground_content = false, + groups = {cracky = 2,not_in_creative_inventory=1}, +}) +minetest.register_node("mario:portal_left", { + description = "Portal Left", + drawtype = "glasslike", + tiles = {"mario_border.png"}, + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + --walkable = false, + is_ground_content = false, + groups = {cracky = 2,not_in_creative_inventory=0}, +}) +minetest.register_node("mario:portal_right", { + description = "Portal Right", + drawtype = "glasslike", + tiles = {"mario_border.png"}, + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + --walkable = false, + is_ground_content = false, + groups = {cracky = 2,not_in_creative_inventory=0}, +}) +minetest.register_abm({ + nodenames = {"mario:portal"}, + interval = 0.5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local objs = minetest.env:get_objects_inside_radius(pos, 1) + for k, player in pairs(objs) do + if player:get_player_name() then + + player:setpos({x=pos.x,y=pos.y+12,z=pos.z}) + end + end + end +}) +minetest.register_abm({ + nodenames = {"mario:portal_left"}, + interval = 0.5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local objs = minetest.env:get_objects_inside_radius(pos, 2) + for k, player in pairs(objs) do + if player:get_player_name() then + + player:setpos({x=pos.x+31,y=pos.y+0.1,z=pos.z}) + end + end + end +}) +minetest.register_abm({ + nodenames = {"mario:portal_right"}, + interval = 0.5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local objs = minetest.env:get_objects_inside_radius(pos, 2) + for k, player in pairs(objs) do + if player:get_player_name() then + + player:setpos({x=pos.x-31,y=pos.y+0.1,z=pos.z}) + end + end + end +}) |