public override void WakeUp() { base.WakeUp(); Get = this; mPotionLookup = new Dictionary <string, Potion>(); mPotionLookup.Clear(); PotionList.Clear(); if (!Application.isPlaying) { if (!Manager.IsAwake <Mods>()) { Manager.WakeUp <Mods>("__MODS"); } Mods.Get.Editor.InitializeEditor(true); List <string> potionNames = Mods.Get.Available("Potion"); for (int i = 0; i < potionNames.Count; i++) { Potion potion = null; if (Application.isPlaying) { if (Mods.Get.Runtime.LoadMod <Potion>(ref potion, "Potion", potionNames[i])) { mPotionLookup.Add(potion.Name.ToLower().Trim().Replace(" ", ""), potion); PotionList.Add(potion); } } else { if (Mods.Get.Editor.LoadMod <Potion>(ref potion, "Potion", potionNames[i])) { mPotionLookup.Add(potion.Name.ToLower().Trim().Replace(" ", ""), potion); PotionList.Add(potion); } } } } gPotionGenericWorldItem = new GenericWorldItem(); gPotionGenericWorldItem.PackName = "MedicalSupplies"; gPotionGenericWorldItem.PrefabName = "Potion Bottle 1"; //gPotionGenericWorldItem.State = "Default"; gPotionGenericWorldItem.DisplayName = "Potion"; gPotionGenericWorldItem.Subcategory = "HealingPotion"; }
public void Awake() { potions = (Frontiers.Potions)target; }