From 1fd5c51f033263c0e1e0e2812f6430d031471dc6 Mon Sep 17 00:00:00 2001 From: Mini-Chiss Date: Tue, 4 Aug 2015 17:33:23 +0200 Subject: [PATCH] DINGO ATE MY BABY --- .../src/nautilus/game/arcade/game/Game.java | 8 +++++++- .../arcade/gui/privateServer/button/ChooseMapButton.java | 1 + .../game/arcade/managers/GameCreationManager.java | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index a59565071..dd86eead8 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -294,6 +294,8 @@ public abstract class Game implements Listener } if (Manager.GetGameCreationManager().MapPref != null) { + System.out.println("Map Preference: " + Manager.GetGameCreationManager().MapPref); + HashMap> matches = new HashMap>(); for (GameType game : _files.keySet()) { @@ -302,7 +304,7 @@ public abstract class Game implements Listener { if (cur.toLowerCase().contains(Manager.GetGameCreationManager().MapPref.toLowerCase())) { - if(game.toString().toLowerCase().contains(Manager.GetGameCreationManager().MapSource.toLowerCase())) + if(game.GetName().toLowerCase().contains(Manager.GetGameCreationManager().MapSource.toLowerCase())) { list.add(cur); System.out.print("Map Preference: " + cur); @@ -318,6 +320,10 @@ public abstract class Game implements Listener Manager.GetGameCreationManager().MapPref = null; Manager.GetGameCreationManager().MapSource = null; } + else + { + System.out.println("Map Preference: None"); + } WorldData = new WorldData(this); //Stat Trackers diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java index 37a38e6f8..a56b7e67e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/ChooseMapButton.java @@ -36,6 +36,7 @@ public class ChooseMapButton implements IButton _arcadeManager.GetGameCreationManager().MapSource = _gameType.GetName(); if(_gameType.getMapSource() != null) _arcadeManager.GetGameCreationManager().MapSource = _gameType.getMapSource()[0].GetName(); + _arcadeManager.GetGameCreationManager().MapPref = _map; _arcadeManager.GetGame().setGame(_gameType, player, true); player.closeInventory(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java index 955a6e8f8..1e51b1d42 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameCreationManager.java @@ -167,6 +167,9 @@ public class GameCreationManager implements Listener HashMap pastTeams = null; + System.out.println(_nextGame == null ? "Next Game = null" : "Next Game = " + _nextGame.GetName()); + System.out.println(MapPref == null ? "Map Pref = null" : "Map Pref = " + MapPref); + //Chosen Game if (_nextGame != null) {