mirror of
				https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
				synced 2024-08-14 23:57:25 +00:00 
			
		
		
		
	testing Licentia stuff
This commit is contained in:
		
							parent
							
								
									9f85f3bd33
								
							
						
					
					
						commit
						b3df4f7314
					
				
					 9 changed files with 27 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -62,6 +62,9 @@
 | 
			
		|||
      <HintPath>..\..\..\..\..\..\workshop\content\294100\818773962\Assemblies\HugsLib.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="LicentiaLabs">
 | 
			
		||||
      <HintPath>..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\rjw-base\1.3\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
    </Reference>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
    public abstract class Recipe_Plastic_Surgery : Recipe_Surgery
 | 
			
		||||
    {
 | 
			
		||||
        protected readonly bool HasDyspareunia = ModLister.HasActiveModWithName("Dyspareunia");
 | 
			
		||||
        protected readonly bool HasLicentia = ModLister.HasActiveModWithName("RimJobWorld - Licentia Labs");
 | 
			
		||||
 | 
			
		||||
        public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -41,15 +42,21 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
            PenetrationUtility.AddDamageHediff(DamageDefOf.SexStretch, 0.5f, hed, null);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected void SurgeryX(Pawn pawn, float severity, bool useDyspareunia = false)
 | 
			
		||||
        protected void SurgeryX(Pawn pawn, float severity, bool damagePart = false)
 | 
			
		||||
        {
 | 
			
		||||
            GetHediffs(pawn).ForEach(hed =>
 | 
			
		||||
            {
 | 
			
		||||
                hed.Severity = severity;
 | 
			
		||||
                if (useDyspareunia && HasDyspareunia) DamageHediff(hed);
 | 
			
		||||
                if (damagePart && HasDyspareunia) DamageHediff(hed);
 | 
			
		||||
                if (damagePart && HasLicentia)
 | 
			
		||||
                {
 | 
			
		||||
                    var (type, damage) = GetLicentiaDamage();
 | 
			
		||||
                    LicentiaLabs.DamageHelper.ApplyDamage(pawn, hed.Part, type, damage);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected abstract List<Hediff> GetHediffs(Pawn pawn);
 | 
			
		||||
        protected abstract (HediffDef, float) GetLicentiaDamage();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -55,6 +55,8 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
            severity = curve.Evaluate(cupSize);
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        protected override (HediffDef, float) GetLicentiaDamage() => throw new NotSupportedException();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Recipe_Surgery_Mammoplasty_A : Recipe_Surgery_Mammoplasty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using System.Collections.Generic;
 | 
			
		||||
using LicentiaLabs;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,6 +22,9 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
        {
 | 
			
		||||
            return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override (HediffDef, float) GetLicentiaDamage() =>
 | 
			
		||||
            (Licentia.HediffDefs.StretchTear, 0.2f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using System.Collections.Generic;
 | 
			
		||||
using LicentiaLabs;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +21,9 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
        {
 | 
			
		||||
            return pawn.GetAnusList();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        protected override (HediffDef, float) GetLicentiaDamage() =>
 | 
			
		||||
            (Licentia.HediffDefs.StretchTear, 0.2f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using System.Collections.Generic;
 | 
			
		||||
using LicentiaLabs;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +21,9 @@ namespace RJW_PlasticSurgeries
 | 
			
		|||
        {
 | 
			
		||||
            return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        protected override (HediffDef, float) GetLicentiaDamage() =>
 | 
			
		||||
            (Licentia.HediffDefs.StretchTear, 0.2f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue