示例#1
0
        public override void PostAdd(DamageInfo?dinfo)
        {
            if (pawn.gender == Gender.Female)
            {
                string key  = "EggsTransported";
                string text = TranslatorFormattedStringExtensions.Translate(key, pawn.LabelIndefinite()).CapitalizeFirst();
                Messages.Message(text, pawn, MessageTypeDefOf.NeutralEvent);

                PawnKindDef           spawn = PawnKindDefOf.Megascarab;
                PawnGenerationRequest req1  = new PawnGenerationRequest(spawn, fixedGender: Gender.Female);
                PawnGenerationRequest req2  = new PawnGenerationRequest(spawn, fixedGender: Gender.Male);
                Pawn implanter  = PawnGenerator.GeneratePawn(req1);
                Pawn fertilizer = PawnGenerator.GeneratePawn(req2);
                Find.WorldPawns.PassToWorld(implanter);
                Find.WorldPawns.PassToWorld(fertilizer);
                Sexualizer.sexualize_pawn(implanter);
                Sexualizer.sexualize_pawn(fertilizer);
                //Pawn cumSender = (from p in Find.WorldPawns.AllPawnsAlive where p.gender == Gender.Male select p).RandomElement<Pawn>();
                //--Log.Message("[RJW]" + this.GetType().ToString() + "PostAdd() - Sending " + xxx.get_pawnname(cumSender) + "'s cum into " + xxx.get_pawnname(pawn) + "'s v****a");
                PregnancyHelper.impregnate(pawn, implanter, xxx.rjwSextype.Vaginal);
                PregnancyHelper.impregnate(pawn, fertilizer, xxx.rjwSextype.Vaginal);
            }
            pawn.health.RemoveHediff(this);
        }
示例#2
0
        // The main method for adding genitalia and orientation.
        public void Sexualize(Pawn pawn, bool reroll = false)
        {
            if (reroll)
            {
                Comp(pawn).orientation = Orientation.None;

                if (xxx.has_quirk(pawn, "Fertile"))
                {
                    Hediff fertility = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("IncreasedFertility"));
                    if (fertility != null)
                    {
                        pawn.health.RemoveHediff(fertility);
                    }
                }
                if (xxx.has_quirk(pawn, "Infertile"))
                {
                    Hediff fertility = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("DecreasedFertility"));
                    if (fertility != null)
                    {
                        pawn.health.RemoveHediff(fertility);
                    }
                }
                quirks = new StringBuilder();
            }
            else if (Comp(pawn).orientation != Orientation.None)
            {
                return;
            }

            //roll random RJW orientation
            Comp(pawn).orientation = xxx.is_animal(pawn) ? RollAnimalOrientation(pawn) : RollOrientation(pawn);

            //Asexual nymp re-roll
            //if (xxx.is_nympho(pawn))
            //	while (Comp(pawn).orientation == Orientation.Asexual)
            //	{
            //		Comp(pawn).orientation = RollOrientation();
            //	}

            //Log.Message("Sexualizing pawn " + pawn?.Name + ", def: " + pawn?.def?.defName);

            if (!reroll)
            {
                Sexualizer.sexualize_pawn(pawn);
            }
            //Log.Message("Orientation for pawn " + pawn?.Name + " is " + orientation);

            if (xxx.has_traits(pawn) && Genital_Helper.has_genitals(pawn) && !(pawn.kindDef.race.defName.ToLower().Contains("droid") && !AndroidsCompatibility.IsAndroid(pawn)))
            {
                if (RJWPreferenceSettings.sexuality_distribution == RJWPreferenceSettings.Rjw_sexuality.Vanilla)
                {
                    VanillaTraitCheck(pawn);
                }
                if (RJWPreferenceSettings.sexuality_distribution == RJWPreferenceSettings.Rjw_sexuality.Psychology)
                {
                    CopyPsychologySexuality(pawn);
                }
                if (RJWPreferenceSettings.sexuality_distribution == RJWPreferenceSettings.Rjw_sexuality.SYRIndividuality)
                {
                    CopyIndividualitySexuality(pawn);
                }
            }
            else if ((pawn.kindDef.race.defName.ToLower().Contains("droid") && !AndroidsCompatibility.IsAndroid(pawn)) || !Genital_Helper.has_genitals(pawn))
            {
                // Droids with no genitalia are set as asexual.
                // If player later adds genitalia to the droid, the droid 'sexuality' gets rerolled.
                Comp(pawn).orientation = Orientation.Asexual;
            }

            QuirkAdder.Generate(pawn);

            if (quirks.Length == 0)
            {
                quirks.Append("None");
                quirksave = quirks.ToString();
            }
        }