예제 #1
0
        public static string PurchasableMessage(PurchaseInteraction PI)
        {
            string displayName = $"{PI.GetDisplayName()}";
            string cost        = PI.GetTextFromPurchasableType();
            string costColor   = PI.GetColorFromPurchasableType();

            if (PI.InteractableIsUsedUp())
            {
                if (PI.IsContainer())
                {
                    cost = "Opened";
                }
                else if (PI.IsShrine())
                {
                    cost = "Used";
                }
                else
                {
                    cost = "Unavailable";
                }
                costColor = RoR2Colors.Tier1ItemDark;
            }
            string message = $"<color={RoR2Colors.Tier1ItemDark}>{displayName}:</color> <color={costColor}>{cost}</color>";

            return(message);
        }
예제 #2
0
        public static string ShopTerminalMessage(ShopTerminalBehavior STB)
        {
            PickupIndex         pickupIdx = STB.CurrentPickupIndex();
            PurchaseInteraction PI        = STB.GetComponent <PurchaseInteraction>();
            string cost          = $"<color={PI.GetColorFromPurchasableType()}>{PI.GetTextFromPurchasableType()}</color>";
            string tierColor     = $"#{ColorUtility.ToHtmlStringRGB(pickupIdx.GetPickupColor())}";
            string tierColorDark = $"#{ColorUtility.ToHtmlStringRGB(pickupIdx.GetPickupColorDark())}";

            if (STB.pickupIndexIsHidden)
            {
                string message = $"<color={tierColor}>??? ({cost}): <color={tierColorDark}>???</color>";
                return(message);
            }
            return(ItemMessage(pickupIdx, cost));
        }