From ec266cd00ab457dc443e06ad858b0e7eea000c39 Mon Sep 17 00:00:00 2001 From: JavidPack Date: Sun, 18 Dec 2016 05:02:47 -0700 Subject: [PATCH] 0.1.0.2 release, bug fix for mod load order. --- ItemChecklist.cs | 23 ++++++++++++++++++++++- ItemChecklistPlayer.cs | 4 ++-- build.txt | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ItemChecklist.cs b/ItemChecklist.cs index 75f1938..97a1875 100644 --- a/ItemChecklist.cs +++ b/ItemChecklist.cs @@ -14,6 +14,7 @@ namespace ItemChecklist static internal ItemChecklist instance; internal static ModHotKey ToggleChecklistHotKey; internal static UserInterface ItemChecklistInterface; + //internal bool UIInitialized; internal ItemChecklistUI ItemChecklistUI; public ItemChecklist() @@ -28,6 +29,7 @@ namespace ItemChecklist { instance = this; ToggleChecklistHotKey = RegisterHotKey("Toggle Item Checklist", "I"); + //UIInitialized = false; //if (!Main.dedServ) //{ // ItemChecklistUI = new ItemChecklistUI(); @@ -37,7 +39,18 @@ namespace ItemChecklist //} } - public override void PostSetupContent() + //public override void PostSetupContent() + //{ + // if (!Main.dedServ) + // { + // ItemChecklistUI = new ItemChecklistUI(); + // ItemChecklistUI.Activate(); + // ItemChecklistInterface = new UserInterface(); + // ItemChecklistInterface.SetState(ItemChecklistUI); + // } + //} + + public override void AddRecipes() { if (!Main.dedServ) { @@ -52,6 +65,14 @@ namespace ItemChecklist int lastSeenScreenHeight; public override void ModifyInterfaceLayers(List layers) { + //if (!UIInitialized) + //{ + // ItemChecklistUI = new ItemChecklistUI(); + // ItemChecklistUI.Activate(); + // ItemChecklistInterface = new UserInterface(); + // ItemChecklistInterface.SetState(ItemChecklistUI); + //} + int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text")); if (MouseTextIndex != -1) { diff --git a/ItemChecklistPlayer.cs b/ItemChecklistPlayer.cs index 9c56022..e143176 100644 --- a/ItemChecklistPlayer.cs +++ b/ItemChecklistPlayer.cs @@ -11,7 +11,7 @@ namespace ItemChecklist { class ItemChecklistPlayer : ModPlayer { - // internal static ItemChecklistPlayer localInstance; + // internal static ItemChecklistPlayer localInstance; // This is a list of items...Holds clean versions of unloaded mystery and loaded real items. internal List foundItems; @@ -59,7 +59,7 @@ namespace ItemChecklist findableItems[i] = true; } } - // localInstance = this; + // localInstance = this; } public override void PreUpdate() diff --git a/build.txt b/build.txt index 25ac9af..d4d2cea 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = jopojelly -version = 0.1.0.1 +version = 0.1.0.2 displayName = Item Checklist homepage = https://forums.terraria.org/index.php?threads/item-checklist-in-game-100-item-collection-checklist.52786/ hideCode = false