public RemoteFridgeCraftingPage(StardewValley.Menus.CraftingPage page, FridgeHandler fridgeHandler) : base(page.xPositionOnScreen, page.yPositionOnScreen, page.width, page.height, true, true, MaterialContainers(page, fridgeHandler)) { exitFunction = page.exitFunction; currentRegion = page.currentRegion; behaviorBeforeCleanup = page.behaviorBeforeCleanup; }
public RemoteFridgeCraftingPage(IClickableMenu page, FridgeHandler fridgeHandler) : base(page.xPositionOnScreen, page.yPositionOnScreen, page.width, page.height, true) { _fridgeHandler = fridgeHandler; }
public RemoteFridgeApi(FridgeHandler handler) { _handler = handler; }
private static List <Chest> MaterialContainers(StardewValley.Menus.CraftingPage handler, FridgeHandler fridgeHandler) { var materialContainers = ModEntry.Instance.Helper.Reflection.GetField <List <Chest> >(handler, "_materialContainers").GetValue(); var chests = new List <Chest>(); chests.AddRange(fridgeHandler.Chests); chests.AddRange(materialContainers); return(chests.Distinct().ToList()); }