mirror of
				https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
				synced 2024-08-14 23:57:25 +00:00 
			
		
		
		
	added Dyspareunia check to Penoplasty
This commit is contained in:
		
							parent
							
								
									34f3fca011
								
							
						
					
					
						commit
						69d9346ee5
					
				
					 1 changed files with 9 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -10,6 +10,8 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
{
 | 
			
		||||
    public abstract class Recipe_Surgery_Penoplasty : Recipe_Surgery
 | 
			
		||||
    {
 | 
			
		||||
        private readonly bool hasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
 | 
			
		||||
        
 | 
			
		||||
        public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
 | 
			
		||||
        {
 | 
			
		||||
            var part = Genital_Helper.get_genitalsBPR(pawn);
 | 
			
		||||
| 
						 | 
				
			
			@ -39,16 +41,17 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
            pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis).ForEach(hed =>
 | 
			
		||||
            {
 | 
			
		||||
                hed.Severity = severity;
 | 
			
		||||
                try
 | 
			
		||||
                if (hasDyspareunia)
 | 
			
		||||
                {
 | 
			
		||||
                    PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
 | 
			
		||||
                }
 | 
			
		||||
                catch (Exception e)
 | 
			
		||||
                {
 | 
			
		||||
                    Log.Error("Try enabling Dyspareunia for sore genitals");
 | 
			
		||||
                    DamageHediff(hed);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private static void DamageHediff(Hediff hed)
 | 
			
		||||
        {
 | 
			
		||||
            PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue