diff --git a/minigame_manager.lua b/minigame_manager.lua index 44c7049..f47c630 100644 --- a/minigame_manager.lua +++ b/minigame_manager.lua @@ -160,10 +160,34 @@ function wormball.get_look_dir(arena,player) end - +local function send_message(arena,num_str) + arena_lib.HUD_send_msg_all("broadcast", arena, "Game Begins In "..num_str, 1, nil, "#255000000") +end arena_lib.on_load("wormball", function(arena) + send_message(arena,'5') + minetest.after(1, function(arena) + send_message(arena,'4') + minetest.after(1, function(arena) + send_message(arena,'3') + minetest.after(1, function(arena) + send_message(arena,'2') + minetest.after(1, function(arena) + send_message(arena,'1') + minetest.after(1, function(arena) + arena_lib.HUD_send_msg_all("broadcast", arena, "GO!", 1, nil, "#255000000") + + end, arena) + + end, arena) + + end, arena) + + end, arena) + + end, arena) + --clear the board of gamepieces local pos1 = arena.area_to_clear_after_game_pos_1 local pos2 = arena.area_to_clear_after_game_pos_2 @@ -227,8 +251,8 @@ arena_lib.on_load("wormball", function(arena) local att = minetest.add_entity(pos, 'wormball:player_att') - if att then minetest.chat_send_all('ent spawned!') - else minetest.chat_send_all('ent not spawned!') end + -- if att then minetest.chat_send_all('ent spawned!') + -- else minetest.chat_send_all('ent not spawned!') end player:set_attach(att, "", {x=0,y=0,z=0}, {x=0,y=0,z=0}) @@ -372,7 +396,7 @@ minetest.register_globalstep(function(dtime) if att then att:move_to(new_pos, true) else - minetest.chat_send_all('not_attached!') + --minetest.chat_send_all('not_attached!') end elseif new_node == 'default:apple' then @@ -386,7 +410,7 @@ minetest.register_globalstep(function(dtime) if att then att:move_to(new_pos, true) else - minetest.chat_send_all('not_attached!') + --minetest.chat_send_all('not_attached!') end else diff --git a/nodes.lua b/nodes.lua index 1a47634..c6d2018 100644 --- a/nodes.lua +++ b/nodes.lua @@ -77,60 +77,3 @@ minetest.register_node("wormball:straight_", { }) - ---minetest.set_node(pos, {name = "nodename", param2 = N}) ,0 = z orient, 1= x orient, 4 = vertical y orient - - -minetest.register_node("wormball:corner_", { - description = "wormball node corner", - drawtype = "mesh", - mesh = 'wormball_corner.b3d', - tiles = {"wormball_straight.png", "wormball_end.png","wormball_corner_side.png","wormball_corner_top.png"}, - paramtype2 = "facedir", - place_param2 = 16, - --0: -y -> -z, - --1: -y -> -x, - --2: -y -> +z, - --3: -y -> +x, - --4: +y -> -z, - --5: -z -> -x, - --6: -y -> -z, - --7: +x -> -z, - --8: -y -> +z, - --9: -x -> +z, - --10:+y -> +z, - --11:+z -> +x, - --12:-z -> -x, - --13:+y -> -x, - --14:-x, ->+z, - --21:+y -> +x - paramtype = "light", - backface_culling = true, - sunlight_propagates = true, -- Sunlight can shine through block - groups = {cracky = 3, oddly_breakable_by_hand = 3}, - sounds = default.node_sound_glass_defaults() -}) - - -minetest.register_entity('wormball:player_att',{ - initial_properties = { - physical = false, - pointable = false, - visual = "sprite", - textures = {'wormball_alpha.png'}, - use_texture_alpha = true, - is_visible = false, - }, - _timer = 1, - - on_step = function(self, dtime, moveresult) - -- self._timer = self._timer + dtime - -- if self._timer < 6 and not(self.object:get_attach()) then - -- self.object:remove() - -- end - return - - - end, - -}) \ No newline at end of file