diff --git a/Assemblies/RJW-ToysAndMasturbation.dll b/Assemblies/RJW-ToysAndMasturbation.dll index 8bd2aec..04b6adc 100644 Binary files a/Assemblies/RJW-ToysAndMasturbation.dll and b/Assemblies/RJW-ToysAndMasturbation.dll differ diff --git a/Defs/ThingDefs/SexToys.xml b/Defs/ThingDefs/SexToys.xml index ddd09b5..5f3f3ad 100644 --- a/Defs/ThingDefs/SexToys.xml +++ b/Defs/ThingDefs/SexToys.xml @@ -42,7 +42,7 @@ Things/SexToys/Dildo CutoutComplex - Graphic_Single + Graphic_Multi diff --git a/Source/JobGivers/JobGiver_MasturbateWithToy.cs b/Source/JobGivers/JobGiver_MasturbateWithToy.cs index 1afac37..0c0b19c 100644 --- a/Source/JobGivers/JobGiver_MasturbateWithToy.cs +++ b/Source/JobGivers/JobGiver_MasturbateWithToy.cs @@ -72,7 +72,7 @@ namespace RJW_ToysAndMasturbation { return false; }; - Predicate validatorForBed = delegate (Thing t) { + Predicate validatorForRoom = delegate (Thing t) { if (t.TryGetComp() == null) { return false; @@ -81,7 +81,7 @@ namespace RJW_ToysAndMasturbation { if (t.TryGetComp().Props.primaryGender == p.gender || (t.TryGetComp().Props.primaryGender == Gender.Male && xxx.can_fuck(p) && (RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.Homo)) || (t.TryGetComp().Props.primaryGender == Gender.Female && xxx.can_be_fucked(p) && (RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.Homo)) - && t.GetRoom(RegionType.Set_All) == p.CurrentBed().GetRoom(RegionType.Set_All)) + && t.GetRoom(RegionType.Set_All) == p.ownership.OwnedRoom) { return true; } @@ -89,9 +89,9 @@ namespace RJW_ToysAndMasturbation { return false; }; - if (p.CurrentBed() != null) + if (p.ownership.OwnedRoom != null) { - sexToy = GenClosest.ClosestThingReachable(p.Position, p.Map, ThingRequest.ForGroup(ThingRequestGroup.HaulableAlways), PathEndMode.OnCell, TraverseParms.For(p), validator: validatorForBed, maxDistance: 100); + sexToy = GenClosest.ClosestThingReachable(p.Position, p.Map, ThingRequest.ForGroup(ThingRequestGroup.HaulableAlways), PathEndMode.OnCell, TraverseParms.For(p), validator: validatorForRoom, maxDistance: 100); } if(sexToy == null) diff --git a/Source/ThingComps/CompSexToy.cs b/Source/ThingComps/CompSexToy.cs index 745511c..f8bc049 100644 --- a/Source/ThingComps/CompSexToy.cs +++ b/Source/ThingComps/CompSexToy.cs @@ -34,14 +34,12 @@ namespace RJW_ToysAndMasturbation { else { yield return new FloatMenuOption(FloatMenuOptionLabel(pawn), delegate { + Building_Bed bed = pawn.ownership?.OwnedBed; + if (bed != null && (WanderUtility.InSameRoom(bed.Position, parent.Position, pawn.Map) || RJWPreferenceSettings.FapInBed && pawn.jobs.curDriver is JobDriver_LayDown)) { - if (RJWPreferenceSettings.FapInBed && pawn.jobs.curDriver is JobDriver_LayDown down) { - Building_Bed bed = down.Bed; - if (bed != null) { - Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, bed, bed.Position); - j.count = 1; - pawn.jobs.TryTakeOrderedJob(j); - } + Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, bed, bed.Position); + j.count = 1; + pawn.jobs.TryTakeOrderedJob(j); } else { Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, null, FapLocation(pawn)); diff --git a/Textures/Things/SexToys/Dildo.png b/Textures/Things/SexToys/Dildo_east.png similarity index 100% rename from Textures/Things/SexToys/Dildo.png rename to Textures/Things/SexToys/Dildo_east.png diff --git a/Textures/Things/SexToys/Dildo_m.png b/Textures/Things/SexToys/Dildo_eastm.png similarity index 100% rename from Textures/Things/SexToys/Dildo_m.png rename to Textures/Things/SexToys/Dildo_eastm.png diff --git a/Textures/Things/SexToys/Dildo_north.png b/Textures/Things/SexToys/Dildo_north.png new file mode 100644 index 0000000..2a5ce54 Binary files /dev/null and b/Textures/Things/SexToys/Dildo_north.png differ diff --git a/Textures/Things/SexToys/Dildo_northm.png b/Textures/Things/SexToys/Dildo_northm.png new file mode 100644 index 0000000..7fac6c5 Binary files /dev/null and b/Textures/Things/SexToys/Dildo_northm.png differ diff --git a/Textures/Things/SexToys/Dildo_south.png b/Textures/Things/SexToys/Dildo_south.png new file mode 100644 index 0000000..2a5ce54 Binary files /dev/null and b/Textures/Things/SexToys/Dildo_south.png differ diff --git a/Textures/Things/SexToys/Dildo_southm.png b/Textures/Things/SexToys/Dildo_southm.png new file mode 100644 index 0000000..7fac6c5 Binary files /dev/null and b/Textures/Things/SexToys/Dildo_southm.png differ