Ejemplo n.º 1
0
        //this is a generic text describing why you cannot equip an armor, based on the current upper and lower garments you have on.
        //This is modified to work with any cases, though it's highly likely you'll want more control than this if you have weird edge cases.
        protected string GenericCantWearWithUnderGarmentText(UpperGarmentBase upperGarment, LowerGarmentBase lowerGarment, bool allowsUpperGarment = false, bool allowsLowerGarment = false)
        {
            if (allowsUpperGarment && allowsLowerGarment)
            {
                return("");
            }
            bool both = !allowsLowerGarment && !allowsLowerGarment;

            StringBuilder sb = new StringBuilder();

            sb.Append("It would be awkward to put on the" + ItemDescription() + " when you're currently wearing ");

            if (!UpperGarmentBase.IsNullOrNothing(upperGarment) && !allowsUpperGarment)
            {
                sb.Append(upperGarment.ItemDescription(1, true));
            }

            if (!LowerGarmentBase.IsNullOrNothing(lowerGarment) && !allowsLowerGarment)
            {
                if (both)
                {
                    sb.Append(" and ");
                }
                sb.Append(lowerGarment.ItemDescription(1, true));
            }

            sb.Append(". You should consider removing " + (both ? "them" : "it") + ". You put the " + ItemDescription() + " back into your inventory.");

            return(sb.ToString());
        }
Ejemplo n.º 2
0
 public override bool CanWearWithLowerGarment(Creature wearer, LowerGarmentBase lowerGarment, out string whyNot)
 {
     if (!LowerGarmentBase.IsNullOrNothing(lowerGarment))
     {
         whyNot = GenericArmorIncompatText(lowerGarment);
         return(false);
     }
     else
     {
         whyNot = null;
         return(true);
     }
 }
Ejemplo n.º 3
0
 public override bool CanWearWithLowerGarment(Creature wearer, LowerGarmentBase lowerGarment, out string whyNot)
 {
     //means you're pure enough to pull it off, or you're not wearing any lower garments.
     if (SupportsUndergarment(wearer) || LowerGarmentBase.IsNullOrNothing(lowerGarment))
     {
         whyNot = null;
         return(true);
     }
     else
     {
         whyNot = NotPureEnough(wearer, lowerGarment.ItemName());
         return(false);
     }
 }
Ejemplo n.º 4
0
        public override bool CanWearWithUndergarments(Creature wearer, UpperGarmentBase upperGarment, LowerGarmentBase lowerGarment, out string whyNot)
        {
            bool wornUpper = !UpperGarmentBase.IsNullOrNothing(upperGarment);
            bool wornLower = !LowerGarmentBase.IsNullOrNothing(lowerGarment);

            if (!wearer.IsPureEnough(10) && (wornUpper || wornLower))
            {
                string output = "";
                output = "You could put on your " + ItemName() + " when you're currently wearing your ";
                if (wornUpper)
                {
                    output   += wearer.upperGarment.ItemName();
                    wornUpper = true;
                }
                if (wornLower)
                {
                    if (wornUpper)
                    {
                        output += " and ";
                    }
                    output += wearer.lowerGarment.ItemName();
                }
                output += ", but you get the feeling it'd be like, super uncomfortable. What's the point of wearing such a sexy, " +
                          "revealing outfit if you're just gonna cover it all up? You're not a prude!";

                if (wearer.IsPureEnough(25))
                {
                    output += " Wait a minute, did you really think that? This place must really be getting to you.";
                }

                whyNot = output;
                return(false);
            }
            else
            {
                whyNot = null;
                return(true);
            }
        }
Ejemplo n.º 5
0
 public override bool CanWearWithLowerGarment(Creature wearer, LowerGarmentBase lowerGarment, out string whyNot)
 {
     whyNot = GenericArmorIncompatText(lowerGarment);
     return(false);
 }
Ejemplo n.º 6
0
 public override bool Equals(LowerGarmentBase other)
 {
     return(other is GenericLowerGarment generic && generic.uniqueID == uniqueID);
 }
Ejemplo n.º 7
0
 public virtual bool CanWearWithLowerGarment(Creature wearer, LowerGarmentBase lowerGarment, out string whyNot)
 {
     whyNot = null;
     return(true);
 }
Ejemplo n.º 8
0
        //This is virtual in case you want to alter how the checks are done or provide some random text explaining why it fails so hard.
        public virtual bool CanWearWithUndergarments(Creature wearer, UpperGarmentBase upperGarment, LowerGarmentBase lowerGarment, out string whyNot)
        {
            bool allowsUpper = CanWearWithUpperGarment(wearer, upperGarment, out string _);
            bool allowsLower = CanWearWithLowerGarment(wearer, lowerGarment, out string _);

            if (allowsLower && allowsUpper)
            {
                whyNot = null;
                return(true);
            }
            else
            {
                whyNot = GenericCantWearWithUnderGarmentText(upperGarment, lowerGarment, allowsUpper, allowsLower);
                return(false);
            }
        }
Ejemplo n.º 9
0
 protected string GenericArmorIncompatText(LowerGarmentBase lowerGarment)
 {
     return("It would be awkward to wear this with the " + ItemDescription() + " you're already wearing. If you want to wear this, " +
            "you'll need to remove it first.");
 }