public ScavengerMenu( Item lastScavengerItem, StardewModdingAPI.IReflectionHelper reflection) : base(IClickableMenu.spaceToClearSideBorder, Game1.viewport.Height - ChatBox.chatboxHeight - IClickableMenu.spaceToClearSideBorder, Game1.tileSize, Game1.tileSize, false) { this.Reflection = reflection; initalPosition = new Rectangle(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height); if (ScavengerRecipe == null) { button = new ClickableComponent(initalPosition, ""); } //until I can populate the recipe, button is still this button = new ClickableComponent(initalPosition, ""); currentRecipeList = new Dictionary <int, int>(); }
private void getRecipeList(StardewModdingAPI.IReflectionHelper reflection) { this.currentRecipeList = reflection.GetField <Dictionary <int, int> >(ScavengerRecipe, "recipeList").GetValue(); this.recipeListNeedsUpdate = !this.recipeListNeedsUpdate; }