better bed positioning + mirroring
| 
						 | 
					@ -42,7 +42,7 @@
 | 
				
			||||||
    <graphicData>
 | 
					    <graphicData>
 | 
				
			||||||
      <texPath>Things/SexToys/Dildo</texPath>
 | 
					      <texPath>Things/SexToys/Dildo</texPath>
 | 
				
			||||||
      <shaderType>CutoutComplex</shaderType>
 | 
					      <shaderType>CutoutComplex</shaderType>
 | 
				
			||||||
      <graphicClass>Graphic_Single</graphicClass>
 | 
					      <graphicClass>Graphic_Multi</graphicClass>
 | 
				
			||||||
    </graphicData>
 | 
					    </graphicData>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <statBases>
 | 
					    <statBases>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ namespace RJW_ToysAndMasturbation {
 | 
				
			||||||
				return false;
 | 
									return false;
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			Predicate<Thing> validatorForBed = delegate (Thing t) {
 | 
								Predicate<Thing> validatorForRoom = delegate (Thing t) {
 | 
				
			||||||
				if (t.TryGetComp<CompSexToy>() == null)
 | 
									if (t.TryGetComp<CompSexToy>() == null)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					return false;
 | 
										return false;
 | 
				
			||||||
| 
						 | 
					@ -81,7 +81,7 @@ namespace RJW_ToysAndMasturbation {
 | 
				
			||||||
				if (t.TryGetComp<CompSexToy>().Props.primaryGender == p.gender ||
 | 
									if (t.TryGetComp<CompSexToy>().Props.primaryGender == p.gender ||
 | 
				
			||||||
					(t.TryGetComp<CompSexToy>().Props.primaryGender == Gender.Male && xxx.can_fuck(p) && (RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.Homo)) ||
 | 
										(t.TryGetComp<CompSexToy>().Props.primaryGender == Gender.Male && xxx.can_fuck(p) && (RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.FeMalesex == RJWPreferenceSettings.AllowedSex.Homo)) ||
 | 
				
			||||||
					(t.TryGetComp<CompSexToy>().Props.primaryGender == Gender.Female && xxx.can_be_fucked(p) && (RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.All || RJWPreferenceSettings.Malesex == RJWPreferenceSettings.AllowedSex.Homo))
 | 
										(t.TryGetComp<CompSexToy>().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;
 | 
										return true;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					@ -89,9 +89,9 @@ namespace RJW_ToysAndMasturbation {
 | 
				
			||||||
				return false;
 | 
									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)
 | 
								if(sexToy == null)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,15 +34,13 @@ namespace RJW_ToysAndMasturbation {
 | 
				
			||||||
			else {
 | 
								else {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				yield return new FloatMenuOption(FloatMenuOptionLabel(pawn), delegate {
 | 
									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);
 | 
											Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, bed, bed.Position);
 | 
				
			||||||
						j.count = 1;
 | 
											j.count = 1;
 | 
				
			||||||
						pawn.jobs.TryTakeOrderedJob(j);
 | 
											pawn.jobs.TryTakeOrderedJob(j);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
					else {
 | 
										else {
 | 
				
			||||||
						Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, null, FapLocation(pawn));
 | 
											Job j = JobMaker.MakeJob(MasturbateToyDefOf.MasturbateWithToy, parent, null, FapLocation(pawn));
 | 
				
			||||||
						j.count = 1;
 | 
											j.count = 1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB  | 
| 
		 Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Textures/Things/SexToys/Dildo_north.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Textures/Things/SexToys/Dildo_northm.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Textures/Things/SexToys/Dildo_south.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Textures/Things/SexToys/Dildo_southm.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 2.7 KiB  |