diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll index 653a704..119b9b7 100644 Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ diff --git a/Common/Defs/DutyDefs/Duties_Succubus.xml b/Common/Defs/DutyDefs/Duties_Succubus.xml index a5edc79..f441c6f 100644 --- a/Common/Defs/DutyDefs/Duties_Succubus.xml +++ b/Common/Defs/DutyDefs/Duties_Succubus.xml @@ -4,7 +4,7 @@ rjw_genes_flirt - +
  • SatisfyingNeeds @@ -36,12 +36,29 @@
  • - - +
  • + + +
  • + +
  • +
  • +
  • + +
  • + +
  • + 0.1 + +
  • + +
  • +
    +
  • - +
  • 5
  • diff --git a/Source/Genes/Life_Force/JobDrivers/JobDriver_Flirt.cs b/Source/Genes/Life_Force/JobDrivers/JobDriver_Flirt.cs index 4e26f38..28e6606 100644 --- a/Source/Genes/Life_Force/JobDrivers/JobDriver_Flirt.cs +++ b/Source/Genes/Life_Force/JobDrivers/JobDriver_Flirt.cs @@ -28,7 +28,7 @@ namespace RJW_Genes { this.FailOnDespawnedOrNull(TargetIndex.A); yield return Toils_Interpersonal.GotoInteractablePosition(TargetIndex.A); - yield return Toils_General.Wait(600, TargetIndex.A); + yield return Toils_General.Wait(300, TargetIndex.A); yield return Toils_Interpersonal.WaitToBeAbleToInteract(this.pawn); Toil toil = Toils_Interpersonal.GotoInteractablePosition(TargetIndex.A); toil.socialMode = RandomSocialMode.Off; diff --git a/Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs b/Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs new file mode 100644 index 0000000..25e1ca8 --- /dev/null +++ b/Source/Genes/Life_Force/JobGiver_TryQuickieWith.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using rjw; +using RimWorld; +using Verse; +using Verse.AI; +namespace RJW_Genes +{ + public class JobGiver_TryQuickieWith : ThinkNode_JobGiver + { + protected override Job TryGiveJob(Pawn pawn) + { + Pawn target = pawn.mindState.duty.focus.Pawn; + Pawn_JobTracker jobs = target.jobs; + string pawn_name = xxx.get_pawnname(pawn); + string target_name = xxx.get_pawnname(target); + //can reserve eachother + if (pawn.CanReserveAndReach(target, PathEndMode.InteractionCell, Danger.Some) && target.CanReserve(pawn, 1, 0, null, false)) + { + //target is not busy + if (!(((jobs != null) ? jobs.curJob : null) != null && (jobs.curJob.playerForced || !CasualSex_Helper.quickieAllowedJobs.Contains(jobs.curJob.def)))) + { + float willingness = TargetWillingness(pawn, target); + if (Rand.Chance(willingness)) + { + return JobMaker.MakeJob(xxx.quick_sex, target); + } + else + { + if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns + { + ModLog.Message(string.Format("{0} was not interested in having sex with {1}: ({2} chance)", pawn_name, target_name, willingness)); + } + } + } + else + { + if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns + { + ModLog.Message(string.Format(" find_pawn_to_fuck({0}): lover has important job ({1}), skipping", pawn_name, target.jobs.curJob.def)); + } + } + } + else + { + if (RJWSettings.DebugLogJoinInBed) //change this when we have our own settigns + { + ModLog.Message(" (" + pawn_name + "): cannot reach or reserve " + target_name); + } + } + return null; + } + public static float TargetWillingness(Pawn pawn, Pawn target) + { + string pawn_name = xxx.get_pawnname(pawn); + float willingness = SexAppraiser.would_fuck(target,pawn); + bool nymph = xxx.is_nympho(target); + bool loverelation = LovePartnerRelationUtility.LovePartnerRelationExists(pawn, target); + if (nymph || loverelation) + { + willingness *= 2; + } + if (xxx.HasNonPolyPartner(pawn, false) && !loverelation) + { + if (RJWHookupSettings.NymphosCanCheat && nymph && xxx.is_frustrated(pawn)) + { + if (RJWSettings.DebugLogJoinInBed) + { + ModLog.Message(" find_partner(" + pawn_name + "): I'm a nympho and I'm so frustrated that I'm going to cheat"); + } + } + else + { + if (!pawn.health.hediffSet.HasHediff(HediffDef.Named("AlcoholHigh"), false)) + { + if (RJWSettings.DebugLogJoinInBed) + { + ModLog.Message(" find_partner(" + pawn_name + "): I interested in banging but that's cheating"); + } + //Succubus has a small chance to seduce even if target is in relationship, maybe setting + willingness *= 0.1f; + } + else + { + if (RJWSettings.DebugLogJoinInBed) + { + ModLog.Message(" find_partner(" + pawn_name + "): I want to bang and im too drunk to care if its cheating"); + } + //No change + } + } + } + return willingness; + } + } +} diff --git a/Source/Rjw-Genes.csproj b/Source/Rjw-Genes.csproj index 218f637..ab95d8f 100644 --- a/Source/Rjw-Genes.csproj +++ b/Source/Rjw-Genes.csproj @@ -130,6 +130,7 @@ +