Ejemplo n.º 1
0
 private static bool on_begin_matin(JobDriver_Mate __instance)
 {
     //only reproductive male starts mating job
     __instance.FailOn(() =>
                       !(Genital_Helper.has_penis(__instance.pawn) || Genital_Helper.has_penis_infertile(__instance.pawn)));
     return(true);
 }
Ejemplo n.º 2
0
        private static bool on_begin_matin(JobDriver_Mate __instance)
        {
            //only reproductive male starts mating job
            Pawn pawn    = __instance.pawn;
            Pawn partner = null;
            var  any_ins = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;

            partner = (Pawn)(__instance.GetType().GetProperty("Female", any_ins).GetValue(__instance, null));

            __instance.FailOn(() => (!(xxx.can_fuck(pawn))));
            __instance.FailOn(() => (!(xxx.can_be_fucked(partner))));

            if (RJWSettings.override_matin)
            {
                pawn.jobs.EndCurrentJob(JobCondition.Incompletable);
                Job job = JobMaker.MakeJob(xxx.animalBreed, partner);
                pawn.jobs.jobQueue.EnqueueFirst(job);
            }

            return(true);
        }