Exemplo n.º 1
0
 public override IEnumerable <BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r)
 {
     foreach (var part in p.health.hediffSet.GetNotMissingParts())
     {
         if (r.appliedOnFixedBodyParts.Contains(part.def) &&
             ((part != xxx.anus) || (!Genital_Helper.anus_blocked(p))))
         {
             yield return(part);
         }
     }
 }
Exemplo n.º 2
0
        public override IEnumerable <BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r)
        {
            var gen_blo = Genital_Helper.anus_blocked(p);

            foreach (var part in base.GetPartsToApplyOn(p, r))
            {
                if ((!gen_blo) || (part != xxx.anus))
                {
                    yield return(part);
                }
            }
        }
Exemplo n.º 3
0
        public override IEnumerable <BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r)
        {
            if (Genital_Helper.has_anus(p))
            {
                bool blocked = Genital_Helper.anus_blocked(p) || xxx.is_slime(p);                //|| xxx.is_demon(p)

                foreach (BodyPartRecord part in p.health.hediffSet.GetNotMissingParts())
                {
                    if (r.appliedOnFixedBodyParts.Contains(part.def) && (!blocked))
                    {
                        yield return(part);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public override IEnumerable <BodyPartRecord> GetPartsToApplyOn(Pawn p, RecipeDef r)
        {
            //dont add artifical - peg, hydraulics, bionics, archo, ovi
            if (r.addsHediff.addedPartProps?.solid ?? false)
            {
                yield break;
            }

            //dont add if artifical parts present
            if (p.health.hediffSet.hediffs.Any((Hediff hed) =>
                                               (hed.Part != null) &&
                                               r.appliedOnFixedBodyParts.Contains(hed.Part.def) &&
                                               (hed.def.addedPartProps?.solid ?? false)))
            {
                yield break;
            }

            var partBPR = Genital_Helper.get_genitalsBPR(p);
            var parts   = Genital_Helper.get_PartsHediffList(p, partBPR);

            //dont add if no ovi
            //if (Genital_Helper.has_ovipositorF(p, parts) || Genital_Helper.has_ovipositorM(p, parts))
            //	yield break;

            //dont add if same part type not present yet
            if (!Genital_Helper.has_vagina(p, parts) && r.defName.ToLower().Contains("v****a"))
            {
                yield break;
            }
            if (!Genital_Helper.has_penis_fertile(p, parts) && r.defName.ToLower().Contains("penis"))
            {
                yield break;
            }

            //cant install parts when part blocked, on slimes, on demons
            bool blocked = (xxx.is_slime(p) ||          //|| xxx.is_demon(p)
                            (Genital_Helper.genitals_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.genitalsDef)) ||
                            (Genital_Helper.anus_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.anusDef)) ||
                            (Genital_Helper.breasts_blocked(p) && r.appliedOnFixedBodyParts.Contains(xxx.breastsDef)));

            foreach (BodyPartRecord part in base.GetPartsToApplyOn(p, r))
            {
                if (r.appliedOnFixedBodyParts.Contains(part.def) && !blocked)
                {
                    yield return(part);
                }
            }
        }
Exemplo n.º 5
0
 public override bool blocked(Pawn p)
 {
     return(Genital_Helper.anus_blocked(p) || xxx.is_slime(p));             //|| xxx.is_demon(p)
 }