private static void OnIdsAssigned(object sender, EventArgs e) { if (LargeChestId == -1 && ModConfig.Instance.LargeChest.EnableChest) { LargeChestId = JsonAssets.GetBigCraftableId("Large Chest"); } if (MagicChestId == -1 && ModConfig.Instance.MagicChest.EnableChest) { MagicChestId = JsonAssets.GetBigCraftableId("Magic Chest"); } if (SuperMagicChestId == -1 && ModConfig.Instance.SuperMagicChest.EnableChest) { SuperMagicChestId = JsonAssets.GetBigCraftableId("Super Magic Chest"); } if ((LargeChestId <= -1 && ModConfig.Instance.LargeChest.EnableChest) || (MagicChestId <= -1 && ModConfig.Instance.MagicChest.EnableChest) || (SuperMagicChestId <= -1 && ModConfig.Instance.SuperMagicChest.EnableChest)) { return; } ModMonitor.Log($"Large Chest Loaded with ID {LargeChestId}."); ModMonitor.Log($"Magic Chest Loaded with ID {MagicChestId}."); ModMonitor.Log($"Super Magic Chest Loaded with ID {SuperMagicChestId}."); }
private static void loadForNewGame_Postfix() { Farm farm = Game1.getFarm(); if (mJsonAssets != null) { int id = mJsonAssets.GetBigCraftableId("Mailbox"); farm.Objects.Add(Utility.PointToVector2(farm.GetMainMailboxPosition()), new Object(Utility.PointToVector2(farm.GetMainMailboxPosition()), id)); PMonitor.Log($"Added mailbox to farm, id {id}"); } }
private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) { if (JsonAssets != null) { ClothingCatalogueID = JsonAssets.GetBigCraftableId("Clothing Catalogue"); CustomizationMirrorID = JsonAssets.GetBigCraftableId("Customization Mirror"); if (ClothingCatalogueID == -1) { ModEntry.monitor.Log("Could not get the ID for Clothing catalogue", LogLevel.Warn); } if (CustomizationMirrorID == -1) { ModEntry.monitor.Log("Could not get the ID for customization mirror", LogLevel.Warn); } } }
private static void loadForNewGame_Postfix() { Farm farm = Game1.getFarm(); if (mJsonAssets != null) { int id = mJsonAssets.GetBigCraftableId("Wooden Pet Bowl"); farm.Objects.Add(Utility.PointToVector2(farm.petBowlPosition), new Object(Utility.PointToVector2(farm.petBowlPosition), id)); PMonitor.Log("Added wooden pet bowl to farm"); } }
/// <summary> /// Get the ID for our Farm Rearranger, on save loaded as that's when JA loads stuff in /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) { if (JsonAssets != null) { FarmRearrangerID = JsonAssets.GetBigCraftableId("Farm Rearranger"); if (FarmRearrangerID == -1) { Monitor.Log("Could not get the ID for the Farm Rearranger item", LogLevel.Warn); } } }
private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) { if (_jsonAssets == null) { return; } _anvilId = _jsonAssets.GetBigCraftableId("Anvil"); if (_anvilId == -1) { Monitor.Log("Could not get the ID for the Anvil item", LogLevel.Warn); } }
private void OnSaveLoaded(object sender, SaveLoadedEventArgs e) { if (JsonAssets != null) { AnvilID = JsonAssets.GetBigCraftableId("Anvil"); if (AnvilID == -1) { Monitor.Log("Could not get the ID for the Anvil item", LogLevel.Warn); } } }
private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) { if (JsonAssets != null) { SolarionChroniclesGameID = JsonAssets.GetBigCraftableId("Solarion Chronicles: The Game"); LoadScenarios(); if (SolarionChroniclesGameID == -1) { Monitor.Log("Could not get the ID for the Solarion Chronicles Game item", LogLevel.Warn); } } }
private void SaveLoaded(object sender, SaveLoadedEventArgs e) { myChestID = JsonAssets.GetBigCraftableId("Compactor Chest"); CompactorChest.PSI = myChestID; foreach (var loc in Game1.locations) { foreach (var cc in loc.Objects.Pairs.Where(x => x.Value.ParentSheetIndex == myChestID && !(x.Value is CompactorChest)).ToList()) { loc.Objects[cc.Key] = new CompactorChest(cc.Value); } } }
private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) { if (JsonAssets != null) { SewingMachineID = JsonAssets.GetBigCraftableId("Sewing Machine"); DyeCabinetID = JsonAssets.GetBigCraftableId("Dye Cabinet"); if (SewingMachineID == -1) { Monitor.Log("Can't get ID for Sewing Machine. Some functionality will be lost.", LogLevel.Warn); } else { Monitor.Log($"Sewing Machine ID is {SewingMachineID}.", LogLevel.Info); } if (DyeCabinetID == -1) { Monitor.Log("Can't get ID for Dye Cabinet. Some functionality will be lost.", LogLevel.Warn); } else { Monitor.Log($"Dye Cabinet ID is {DyeCabinetID}.", LogLevel.Info); } } }
private string[] Token_BigCraftableId(ITokenString input) { if (input == null) { return(ja.GetAllBigCraftableIds().Values.Select((i) => i.ToString()).ToArray <string>()); } var str = input.Value; int id = ja.GetBigCraftableId(str); if (id == -1) { return new string[] { } } ; return(new[] { id.ToString() }); }
private void GameLoop_SaveLoaded(object sender, SaveLoadedEventArgs e) { if (JA != null) { var piggyBankID = JA.GetBigCraftableId("Piggy Bank"); } responses = new List <Response>(); responses.Add(new Response("Deposit", i18n.Get("Deposit"))); responses.Add(new Response("Withdraw", i18n.Get("Withdraw"))); responses.Add(new Response("Close", i18n.Get("Close"))); if (!Game1.IsMasterGame) { return; } if (allGold == null) { allGold = new allGold(); allGold.goldList = new List <PiggyBankGold>(); for (int i = 0; i < 250; i++) { var temp = Helper.Data.ReadSaveData <PiggyBankGold>("MindMeltMax.PiggyBank-" + i.ToString()); if (temp != null) { allGold.goldList.Add(temp); } else { break; } } if (allGold == null) { allGold.goldList = new List <PiggyBankGold>(); } } }
private void OnIdsAssigned(object sender, EventArgs e) { GrabberID = jsonAssetsApi.GetBigCraftableId(versatileGrabberName); ModMonitor.Log($"Versatile Grabber loaded with ID {GrabberID}", LogLevel.Debug); }