public static GameObject ShowAdditive(BigItemDef[] items, GameObject fsmObj = null, string eventName = null) { int count = RandomizerMod.Instance.Settings.GetAdditiveCount(items[0].Name); BigItemDef shownItem = items[count]; // Extra code so that when we get L/R shade cloak after having the other MWC, we just show the popup for shade cloak // We *only* want to switch to showing Shade Cloak when we have exactly one dash in each direction; otherwise // we'll just show Left and Right Shade Cloaks as usual // - Deactivated because I felt that destroying the information about which shade cloak it is is more // annoying than showing an incorrect dash direction. /* * if (items[0].Name == "Left_Mothwing_Cloak" || items[0].Name == "Right_Mothwing_Cloak" || items[0].Name == "Left_Shade_Cloak" || items[0].Name == "Right_Shade_Cloak") ||{ || if (RandomizerMod.Instance.Settings.GetAdditiveCount("Left_Mothwing_Cloak") == 1 || && RandomizerMod.Instance.Settings.GetAdditiveCount("Right_Mothwing_Cloak") == 1) || { || ReqDef shadeCloak = LogicManager.GetItemDef("Shade_Cloak"); || shownItem = new BigItemDef || { || Name = shownItem.Name, || BoolName = shadeCloak.boolName, || SpriteKey = shadeCloak.bigSpriteKey, || TakeKey = shadeCloak.takeKey, || NameKey = shadeCloak.nameKey, || ButtonKey = shadeCloak.buttonKey, || DescOneKey = shadeCloak.descOneKey, || DescTwoKey = shadeCloak.descTwoKey || }; || } ||} */ return(Show(shownItem, fsmObj, eventName)); }
public static GameObject Show(BigItemDef item, GameObject fsmObj = null, string eventName = null) { Ref.PD.SetBool(item.BoolName, true); return(Show(item.SpriteKey, item.TakeKey, item.NameKey, item.ButtonKey, item.DescOneKey, item.DescTwoKey, fsmObj, eventName)); }