From d2259c3f5d196ef58ccec54e7279e9f66422ec56 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Sun, 16 Jun 2013 01:13:06 -0400 Subject: [PATCH] Reintegrated initialization code for DungeonHelper I had previously removed the function calls in mod_pocketDim to migrate them to DungeonHelper. Completed the migration now. --- .../mod_pocketDim/helpers/DungeonHelper.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index 74c510a..aebd014 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -99,14 +99,35 @@ public class DungeonHelper //Load our reference to the DDProperties singleton if (properties == null) properties = DDProperties.instance(); + + initializeDungeons(); + } + + private void initializeDungeons() + { + File file = new File(properties.CustomSchematicDirectory); + String helpFile = "/mods/DimDoors/How_to_add_dungeons.txt"; + if (new File(helpFile).exists()) + { + copyfile.copyFile(helpFile, file + "/How_to_add_dungeons.txt"); + } + file.mkdir(); + + registerFlipBlocks(); + importCustomDungeons(properties.CustomSchematicDirectory); + registerBaseDungeons(); } public static DungeonHelper create() { if (instance == null) + { instance = new DungeonHelper(); + } else + { throw new IllegalStateException("Cannot create DungeonHelper twice"); + } return instance; }