// Use this for initialization void Start() { Weapon.SetData(null, 0, "Put weapon to enchant here.", WeaponViewerClicked); Enchanter.SetData(null, 0, "Put item to enchant weapon with here.", EnchantViewerClicked); Result.SetData(null, 0, "Result of enchantment goes here.", () => {}); EnchantButton.interactable = false; }
private void SetItem(IconWithTextController holder, CraftingRecipe recipe) { if (CraftingRecipesMade.RecipesMade.Contains(recipe.ID)) { string text = $"{recipe.Result.Item.GetName()}\n<size=50%>"; foreach (var r in recipe.Components) { text += $"{r.Item.GetName()} - {CT.Inventory.GetAmountOf(r.Item)} / {r.Amount}\n"; } holder.SetData(recipe.Result.Item, 1, text, () => { MakeRecipe(recipe); }, showText: false); } else { string text = $"???\n<size=50%>"; foreach (var r in recipe.Components) { text += $"{r.Item.GetName()} - {CT.Inventory.GetAmountOf(r.Item)} / {r.Amount}\n"; } holder.SetData(recipe.Result.Item, 1, text, () => { if (MakeRecipe(recipe)) { CraftingRecipesMade.RecipesMade.Add(recipe.ID); RefreshList(); } }, QuestionMark, false); } }
private void SetDataBuying(IconWithTextController itc, ShopFollower.SellableItem iid) { int price = GetBuyingPrice(iid.Item); string text = $"{iid.Item.GetName()}\n{price} gold each"; itc.SetData(iid.Item, iid.Amount, text, () => ItemClickedBuying(iid)); }
private void SetDataSelling(IconWithTextController itc, InventoryEntry iid) { string text = iid.Item.GetName() + "\n" + GetSellingPrice(iid.Item) + " gold each"; itc.SetData(iid.Item, iid.Amount, text, () => ItemClickedSelling(iid)); }