private void MapPageUpdates() { if (!Context.IsWorldReady) { return; } if (!(Game1.activeClickableMenu is GameMenu)) { return; } if (!IsMapOpen((GameMenu)Game1.activeClickableMenu)) { return; } if (Game1.options.SnappyMenus) { modHelper.Reflection.GetField <Boolean>(Game1.options, "snappyMenus").SetValue(false); } if (Context.IsMainPlayer) { UpdateNPCMarkers(); } UpdateActiveFarmersAsync(); modMapPage = new ModMapPage(npcNames, npcMarkers, activeFarmers); }
// Load config and other one-off data private void SaveEvents_AfterLoad(object sender, EventArgs e) { SecondaryNpcs = new Dictionary <string, bool> { { "Kent", false }, { "Marlon", false }, { "Merchant", false }, { "Sandy", false }, { "Wizard", false } }; CustomHandler.UpdateCustomNpcs(); NpcNames = CustomHandler.GetNpcNames(); MarkerCrop = CustomHandler.GetMarkerCrop(); // Preload UpdateFarmBuildingLocs(); ResetMarkers(); UpdateMarkers(true); ModMapPage = new ModMapPage(NpcMarkers, NpcNames, FarmerMarkers, Helper, Config); }