From 51969793a5e4777de517cdfcb30dd6d8bde0662f Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Sat, 15 Jun 2013 08:46:28 -0400 Subject: [PATCH] Fixed minor bug and cleaned up DungeonHelper Set various lists of DungeonGenerators to private - there was no need to make them public fields. While cleaning up the code before, I accidentally erased the default constructor, which handled loading a reference to DDProperties. I've put the code back in so that the class works correctly. --- .../mod_pocketDim/helpers/DungeonHelper.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index f2c4c2b..9a8936d 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -30,14 +30,15 @@ public class DungeonHelper public ArrayList customDungeons = new ArrayList(); public ArrayList registeredDungeons = new ArrayList(); - public ArrayList weightedDungeonGenList = new ArrayList(); - public ArrayList simpleHalls = new ArrayList(); - public ArrayList complexHalls = new ArrayList(); - public ArrayList deadEnds = new ArrayList(); - public ArrayList hubs = new ArrayList(); - public ArrayList mazes = new ArrayList(); - public ArrayList pistonTraps = new ArrayList(); - public ArrayList exits = new ArrayList(); + + private ArrayList weightedDungeonGenList = new ArrayList(); + private ArrayList simpleHalls = new ArrayList(); + private ArrayList complexHalls = new ArrayList(); + private ArrayList deadEnds = new ArrayList(); + private ArrayList hubs = new ArrayList(); + private ArrayList mazes = new ArrayList(); + private ArrayList pistonTraps = new ArrayList(); + private ArrayList exits = new ArrayList(); public ArrayList tagList = new ArrayList(); @@ -46,6 +47,12 @@ public class DungeonHelper public DungeonGenerator defaultUp = new DungeonGenerator(0, "/schematic/simpleStairsUp.schematic", true); + public DungeonHelper() + { + if (properties == null) + properties = DDProperties.instance(); + } + public void registerCustomDungeon(File schematicFile) { try