Beispiel #1
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.");
            }
        }
Beispiel #2
0
 public override void PostDrawFullscreenMap(ref string mouseText)
 {
     MapAssist.DrawFullscreenMap();
 }