//Update public override void Update(GameTime gameTime) { base.Update(gameTime); if (!whitelistFilled || blacklistChanged) { List <int> idList = new List <int>(); for (int i = 0; i < BossChecklist.bossTracker.SortedBosses.Count; i++) { if (BossChecklist.bossTracker.SortedBosses[i].type == EntryType.Event) { continue; } if (BossChecklist.bossTracker.SortedBosses[i].type == EntryType.MiniBoss && !BossChecklist.ClientConfig.RadarMiniBosses) { continue; } for (int j = 0; j < BossChecklist.bossTracker.SortedBosses[i].npcIDs.Count; j++) { int ID = BossChecklist.bossTracker.SortedBosses[i].npcIDs[j]; if (!BlackListedID(ID) && BossLogUI.GetBossHead(ID) != Main.npcHeadTexture[0]) { idList.Add(ID); } } } whitelistNPCs = idList.ToArray(); Array.Sort(whitelistNPCs); whitelistFilled = true; blacklistChanged = false; } //do stuff SetDrawPos(); }
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."); } }
public override void Load() { instance = this; ToggleBossLog = RegisterHotKey("Toggle Boss Log", "L"); MapAssist.FullMapInitialize(); setup = new SetupBossList(); if (Main.netMode == NetmodeID.Server) { ServerCollectedRecords = new List <BossStats> [255]; for (int i = 0; i < 255; i++) { ServerCollectedRecords[i] = new List <BossStats>(); for (int j = 0; j < instance.setup.SortedBosses.Count; j++) { ServerCollectedRecords[i].Add(new BossStats()); } } } if (!Main.dedServ) { 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); } }