From c48df36459924535d38a0b08d0b9166f26b03292 Mon Sep 17 00:00:00 2001 From: William Burns Date: Wed, 23 Dec 2015 10:26:14 +0000 Subject: [PATCH] Canvas reset with starting picture. --- .../game/arcade/game/games/draw/Draw.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java index 5ce6c89c6..39d381c1c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/draw/Draw.java @@ -54,6 +54,7 @@ import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.stats.KeenEyeStatTracker; import nautilus.game.arcade.stats.MrSquiggleStatTracker; import nautilus.game.arcade.stats.PureLuckStatTracker; +import sun.misc.REException; public class Draw extends SoloGame { @@ -204,11 +205,18 @@ public class Draw extends SoloGame @Override public void ParseData() { - for (Location loc : WorldData.GetCustomLocs("159")) - _canvas.add(loc.getBlock()); + for (Block b : UtilBlock.getInBoundingBox(WorldData.GetDataLocs("LIME").get(0), WorldData.GetDataLocs("LIME").get(1))) + _canvas.add(b); _drawerLocation = WorldData.GetDataLocs("RED").get(0); _textLocation = WorldData.GetDataLocs("YELLOW").get(0); + } + + @EventHandler + public void clearBoardStart(GameStateChangeEvent e) + { + if (e.GetState() != GameState.Live) + return; Reset(); } @@ -706,8 +714,9 @@ public class Draw extends SoloGame { for (Block block : _canvas) { - if (block.getTypeId() != 35 || block.getData() != 0) - block.setTypeIdAndData(35, (byte)0, false); +// if (block.getTypeId() != 35 || block.getData() != 0) +// block.setTypeIdAndData(35, (byte)0, false); + block.setTypeIdAndData(35, (byte) 0, false); } _brushColor = 15;