diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-28 00:03:28 +0100 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-28 00:03:28 +0100 |
commit | 4c03a0e5880e44e920007ead8212025858a1fb21 (patch) | |
tree | 20e7ec370ea0f95a93d2402e7f897e09729a7966 /mario/init.lua | |
parent | 3eb0d44c20383a1c3d0fe4552b169b223010a46e (diff) | |
parent | 55ba62165293b6bf8f3f78e2e5fc3bb5152400f4 (diff) |
Merge branch 'master' of https://github.com/DonBatman/myarcade
Conflicts:
mario/gamestate.lua
mario/hud.lua
mario/init.lua
Diffstat (limited to 'mario/init.lua')
-rw-r--r-- | mario/init.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/mario/init.lua b/mario/init.lua index 283492c..7f60785 100644 --- a/mario/init.lua +++ b/mario/init.lua @@ -7,6 +7,7 @@ dofile(minetest.get_modpath("mario").."/turtle.lua") dofile(minetest.get_modpath("mario").."/gamestate.lua") dofile(minetest.get_modpath("mario").."/hud.lua") + minetest.register_node("mario:placer",{ description = "Reset", tiles = { @@ -21,17 +22,10 @@ minetest.register_node("mario:placer",{ paramtype = "light", groups = {cracky = 3}, on_rightclick = function(pos, node, player, itemstack, pointed_thing) - local schem = minetest.get_modpath("mario").."/schems/mario.mts" - minetest.place_schematic({x=pos.x-1,y=pos.y-2,z=pos.z-2},schem,0, "air", true) - player:setpos({x=pos.x+16,y=pos.y+0.1,z=pos.z+1}) - player:set_physics_override(1,1,0.3,true,false) - mario.game_start(pos, player, { schematic = minetest.get_modpath("mario").."/schems/mario.mts", scorename = "mario:classic_board", }) - - minetest.sound_play("mario-game-start", {pos = pos,max_hear_distance = 40,gain = 10.0,}) end, }) minetest.register_node("mario:placer2",{ @@ -67,9 +61,8 @@ minetest.register_node("mario:exit",{ paramtype = "light", groups = {cracky = 3}, on_rightclick = function(pos, node, player, itemstack, pointed_thing) - player:setpos({x=pos.x-5,y=pos.y+0.1,z=pos.z-3}) - print(name) - player:set_physics_override(1,1,1,true,false) + local game = mario.get_game_by_player(player:get_player_name()) + mario.game_end(game.id) end, }) |