Exemplo n.º 1
0
        private bool DoesTargetPawnAcceptAdvance()
        {
            //if (xxx.config.always_accept_whores)
            //	return true;

            //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() is called");

            if (PawnUtility.EnemiesAreNearby(TargetPawn))
            {
                //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() fail - enemy near");
                return(false);
            }
            if (!allowedJobs.Contains(TargetPawn.jobs.curJob.def))
            {
                //Log.Message("[RJW]JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() fail - not allowed job");
                return(false);
            }

            //Log.Message("Will try " + WhoringHelper.WillPawnTryHookup(TargetPawn));
            //Log.Message("Appeal  " + WhoringHelper.IsHookupAppealing(TargetPawn, W***e));
            //Log.Message("Afford " + WhoringHelper.CanAfford(TargetPawn, W***e));
            //Log.Message("Need sex " + (xxx.need_some_sex(TargetPawn) >= 1));
            W***e.skills.Learn(SkillDefOf.Social, 1.2f);
            return(WhoringHelper.WillPawnTryHookup(TargetPawn) && WhoringHelper.IsHookupAppealing(TargetPawn, W***e) && WhoringHelper.CanAfford(TargetPawn, W***e) && xxx.need_some_sex(TargetPawn) >= 1f);
        }
        private bool DoesTargetPawnAcceptAdvance()
        {
            if (RJWSettings.DebugWhoring)
            {
                Log.Message($"JobDriver_InvitingVisitors::DoesTargetPawnAcceptAdvance() - {xxx.get_pawnname(TargetPawn)}");
            }
            //if (RJWSettings.WildMode) return true;

            if (PawnUtility.EnemiesAreNearby(TargetPawn))
            {
                if (RJWSettings.DebugWhoring)
                {
                    Log.Message($" fail - enemy near");
                }
                return(false);
            }
            if (!allowedJobs.Contains(TargetPawn.jobs.curJob.def))
            {
                if (RJWSettings.DebugWhoring)
                {
                    Log.Message($" fail - not allowed job");
                }
                return(false);
            }

            if (RJWSettings.DebugWhoring)
            {
                Log.Message("Will try hookup " + WhoringHelper.WillPawnTryHookup(TargetPawn));
                Log.Message("Is w***e appealing  " + WhoringHelper.IsHookupAppealing(TargetPawn, W***e));
                Log.Message("Can afford w***e " + WhoringHelper.CanAfford(TargetPawn, W***e));
                Log.Message("Need sex " + (xxx.need_some_sex(TargetPawn) >= 1));
            }
            if (WhoringHelper.WillPawnTryHookup(TargetPawn) && WhoringHelper.IsHookupAppealing(TargetPawn, W***e) && WhoringHelper.CanAfford(TargetPawn, W***e) && xxx.need_some_sex(TargetPawn) >= 1f)
            {
                W***e.skills.Learn(SkillDefOf.Social, 1.2f);
                return(true);
            }
            return(false);
        }
 internal bool RelationCheckPass(Pawn client)
 {
     //Rand.PopState();
     //Rand.PushState(RJW_Multiplayer.PredictableSeed());
     if (xxx.isSingleOrPartnerNotHere(client) || xxx.is_lecher(client) || Rand.Value < 0.9f)
     {
         if (client != LovePartnerRelationUtility.ExistingLovePartner(w***e))
         {                     //Exception for prisoners to account for PrisonerWhoreSexualEmergencyTree, which allows prisoners to try to hook up with anyone who's around (mostly other prisoners or warden)
             return((client != w***e) & (client.Map == w***e.Map) && (client.Faction == w***e.Faction || w***e.IsPrisoner) && (client.IsColonist || w***e.IsPrisoner) && WhoringHelper.IsHookupAppealing(w***e, client));
         }
     }
     return(false);
 }