using System; using System.Collections.Generic; using UnityEngine; public class MarisaPotionMaker : MicroGameHandler { public Potion currentPotion; public List requestedPotions = new(); public List completedPotions = new(); public List failedPotions = new(); //bad to have 3 lists but whatever. public int currentPotionIndex; public class Potion { public string[] chemicals; } public void AddChemical(string chemical) { if (currentPotion.chemicals[currentPotionIndex+1] == chemical ) { currentPotionIndex++; if (currentPotion.chemicals.Length > currentPotionIndex) { CompletePotion(currentPotion, true); } } else { CompletePotion(currentPotion, false); } } public void CompletePotion(Potion potion, bool success) { requestedPotions.Remove(potion); //doesn't work if there's multiple of the same potion.... if (success) { completedPotions.Add(potion); } else { failedPotions.Add(potion); } } }