Example #1
0
        public override void Unload()
        {
            instance = null;
            ToggleChecklistHotKey  = null;
            bossChecklistInterface = null;
            bossTracker            = null;

            UICheckbox.checkboxTexture  = null;
            UICheckbox.checkmarkTexture = null;
        }
Example #2
0
        public override void Load()
        {
            instance = this;
            ToggleChecklistHotKey = RegisterHotKey("Toggle Boss Checklist", "P");
            ToggleBossLog         = RegisterHotKey("Toggle Boss Log", "L");

            tremorLoaded = ModLoader.GetMod("Tremor") != null;

            FieldInfo itemToMusicField = typeof(SoundLoader).GetField("itemToMusic", BindingFlags.Static | BindingFlags.NonPublic);

            itemToMusicReference = (Dictionary <int, int>)itemToMusicField.GetValue(null);

            bossTracker = new BossTracker();

            MapAssist.FullMapInitialize();

            if (!Main.dedServ)
            {
                bossChecklistUI = new BossChecklistUI();
                bossChecklistUI.Activate();
                bossChecklistInterface = new UserInterface();

                UICheckbox.checkboxTexture  = GetTexture("UIElements/checkBox");
                UICheckbox.checkmarkTexture = GetTexture("UIElements/checkMark");

                BossLog = new BossLogUI();
                BossLog.Activate();
                BossLogInterface = new UserInterface();
                BossLogInterface.SetState(BossLog);

                //important, after setup has been initialized
                BossRadarUI = new BossRadarUI();
                BossRadarUI.Activate();
                BossRadarUIInterface = new UserInterface();
                BossRadarUIInterface.SetState(BossRadarUI);
            }

            /*
             * // Fix some translation keys automatically -- TODO
             * FieldInfo translationsField = typeof(Mod).GetField("translations", BindingFlags.Instance | BindingFlags.NonPublic);
             * var translations = (Dictionary<string, ModTranslation>)translationsField?.GetValue(this);
             * if (translations != null) {
             *      foreach (var translation in translations) {
             *              if (translation.Value.GetDefault().Contains("ItemID.")) {
             *                      ItemID.Search.GetId()
             *              }
             *      }
             * }
             */

            if (!DebugConfig.ModCallLogVerbose)
            {
                Logger.Info("Boss Log integration messages will not be logged.");
            }
        }
Example #3
0
 public override void Load()
 {
     instance = this;
     RegisterHotKey("Toggle Boss Checklist", "P");
     if (!Main.dedServ)
     {
         bossChecklistUI = new BossChecklistUI();
         bossChecklistUI.Activate();
         bossChecklistInterface = new UserInterface();
         bossChecklistInterface.SetState(bossChecklistUI);
     }
 }
Example #4
0
 public override void Unload()
 {
     instance = null;
     ToggleChecklistHotKey       = null;
     bossChecklistInterface      = null;
     bossTracker                 = null;
     ToggleBossLog               = null;
     ServerCollectedRecords      = null;
     BossRadarUIInterface        = null;
     BossRadarUI.arrowTexture    = null;
     ClientConfig                = null;
     DebugConfig                 = null;
     BossLogConfig               = null;
     UICheckbox.checkboxTexture  = null;
     UICheckbox.checkmarkTexture = null;
 }
Example #5
0
        public override void Load()
        {
            // Too many people are downloading 0.10 versions on 0.9....
            if (ModLoader.version < new Version(0, 10))
            {
                throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n");
            }
            instance = this;
            ToggleChecklistHotKey = RegisterHotKey("Toggle Boss Checklist", "P");

            tremorLoaded = ModLoader.GetMod("Tremor") != null;

            if (!Main.dedServ)
            {
                bossChecklistUI = new BossChecklistUI();
                bossChecklistUI.Activate();
                bossChecklistInterface = new UserInterface();
                bossChecklistInterface.SetState(bossChecklistUI);
            }
        }
Example #6
0
 public override void Unload()
 {
     instance = null;
     ToggleChecklistHotKey  = null;
     bossChecklistInterface = null;
 }