From 0650b7337450dc8d82e5fc2319f083dca2bfd502 Mon Sep 17 00:00:00 2001 From: Cheese Date: Wed, 1 Jul 2015 14:16:56 +1000 Subject: [PATCH] more bridge tweaks --- .gitignore | 5 ++++ .../game/arcade/game/games/bridge/Bridge.java | 23 +++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index e7c01c354..626bd858f 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,8 @@ Debug /Plugins/Cube/plugin.yml /Plugins/Cube/src/mastaG/Cube/Cube.java /Plugins/Libraries/spigot_server.jar +xOlibro +zBench +zMyst +zSotanna +zSotanna2 diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java index 4393f8129..03dba1f78 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java @@ -102,6 +102,7 @@ public class Bridge extends TeamGame implements OreObsfucation //Mushrooms private NautHashMap _mushroomStem = new NautHashMap(); private NautHashMap _mushroomTop = new NautHashMap(); + private boolean _stemsGrown = false; //Ice private ArrayList _iceBridge = new ArrayList(); @@ -755,7 +756,7 @@ public class Bridge extends TeamGame implements OreObsfucation private void BuildLillyPad() { - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) if (_lillyPads != null && !_lillyPads.isEmpty()) { // Random Block @@ -814,8 +815,12 @@ public class Bridge extends TeamGame implements OreObsfucation MapUtil.QuickChangeBlockAt(lowestLoc, 100, (byte)15); } } + else + { + _stemsGrown = true; + } - else if (_mushroomTop != null && !_mushroomTop.isEmpty()) + if (_stemsGrown && _mushroomTop != null && !_mushroomTop.isEmpty()) { int attempts = 0; int done = 0; @@ -841,9 +846,6 @@ public class Bridge extends TeamGame implements OreObsfucation _mushroomTop.remove(loc); MapUtil.QuickChangeBlockAt(block.getLocation(), 99, (byte)14); - - // Sound - loc.getWorld().playEffect(loc, Effect.STEP_SOUND, 99); done++; } @@ -853,6 +855,12 @@ public class Bridge extends TeamGame implements OreObsfucation @EventHandler public void breakMushroom(BlockBreakEvent event) { + if (event.isCancelled()) + return; + + event.setCancelled(true); + event.getBlock().setType(Material.AIR); + if (event.getBlock().getTypeId() == 100 && WorldData.GetCustomLocs("21").contains(event.getBlock().getLocation().add(0.5, 0, 0.5))) { @@ -878,7 +886,7 @@ public class Bridge extends TeamGame implements OreObsfucation int attempts = 0; int done = 0; - while (done < 4 && attempts < 500) + while (done < 5 && attempts < 400) { attempts++; @@ -903,9 +911,6 @@ public class Bridge extends TeamGame implements OreObsfucation else MapUtil.QuickChangeBlockAt(block.getLocation(), Material.ICE); - // Sound - loc.getWorld().playEffect(loc, Effect.STEP_SOUND, Material.ICE); - done++; } }