public static void LoadArea_Postfix( CommunityCenter __instance, int area) { if (area == CommunityCenter.AREA_JunimoHut) { // Update map if Junimo Hut area is being restored, // assuming all areas have been completed __instance.mapPath.Value = "Maps\\CommunityCenter_Refurbished"; __instance.updateMap(); } string areaName = CommunityCenter.getAreaNameFromNumber(area); CustomCommunityCentre.Events.Game.InvokeOnAreaLoaded(communityCentre: __instance, areaName: areaName, areaNumber: area); }
public static void DoAreaCompleteReward_Postfix( CommunityCenter __instance, int whichArea) { string areaName = CommunityCenter.getAreaNameFromNumber(whichArea); if (!Bundles.IsCustomArea(whichArea) || string.IsNullOrWhiteSpace(areaName)) { return; } string mail = string.Format(Bundles.MailAreaCompleted, Bundles.GetAreaNameAsAssetKey(areaName)); if (Bundles.IsCustomAreaComplete(areaNumber: whichArea) && !Game1.player.hasOrWillReceiveMail(mail)) { // Add some mail flag to this bundle to indicate completion Log.D($"Sending mail for custom bundle completion ({mail})", CustomCommunityCentre.ModEntry.Config.DebugMode); Game1.addMailForTomorrow(mail, noLetter: true); } }