public Produce( string name, string imagePath, Inventory.ProduceType produceType, float hungerYield, float healthYield, float happinessYield, float strengthYield, float intelligenceYield, float agilityYield, int price, bool isEdible, Inventory.ItemRarity rarity ) { this.name = name; this.imagePath = imagePath; this.produceType = produceType; this.hungerYield = hungerYield; this.healthYield = healthYield; this.happinessYield = happinessYield; this.strengthYield = strengthYield; this.intelligenceYield = intelligenceYield; this.agilityYield = agilityYield; this.price = price; this.isEdible = isEdible; this.rarity = rarity; }
public void addFarmProduce(Inventory.ProduceType produceType, int amount) { inventory.produceCounts[(int)produceType] += amount; if (this.OnFarmHarvest != null) { this.OnFarmHarvest(this, new Quest.QuestEventArgs(1)); } Save(false); }
protected override void executeEffect() { Inventory.ProduceType produceType = LootTable.GeneratePondLoot(); string name = System.Enum.GetName(typeof(Inventory.ProduceType), produceType); int amount = Random.Range(1, 4); PetKeeper.pet.addWildProduce(produceType, amount); gc.queueRewardText(name.Replace("_", " ") + " +" + amount, Inventory.getRarityColor(Inventory.getProduceTypeInfo(produceType).rarity)); InventoryUI.reRender = true; PetKeeper.pet.grantXP(50); }
public void addWildProduce(Inventory.ProduceType produceType, int amount) { inventory.produceCounts[(int)produceType] += amount; Save(false); }