mirror of
				https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
				synced 2024-08-14 23:57:38 +00:00 
			
		
		
		
	mc for onslort 1.4
This commit is contained in:
		
							parent
							
								
									711a61a31a
								
							
						
					
					
						commit
						396cbb8c56
					
				
					 23 changed files with 237 additions and 43 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -27,7 +27,7 @@
 | 
				
			||||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
					  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
				
			||||||
    <DebugType>pdbonly</DebugType>
 | 
					    <DebugType>pdbonly</DebugType>
 | 
				
			||||||
    <Optimize>true</Optimize>
 | 
					    <Optimize>true</Optimize>
 | 
				
			||||||
    <OutputPath>bin\Release\</OutputPath>
 | 
					    <OutputPath>1.4\Assemblies\</OutputPath>
 | 
				
			||||||
    <DefineConstants>TRACE</DefineConstants>
 | 
					    <DefineConstants>TRACE</DefineConstants>
 | 
				
			||||||
    <ErrorReport>prompt</ErrorReport>
 | 
					    <ErrorReport>prompt</ErrorReport>
 | 
				
			||||||
    <WarningLevel>4</WarningLevel>
 | 
					    <WarningLevel>4</WarningLevel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
					Microsoft Visual Studio Solution File, Format Version 12.00
 | 
				
			||||||
# Visual Studio Version 16
 | 
					# Visual Studio Version 17
 | 
				
			||||||
VisualStudioVersion = 16.0.31205.134
 | 
					VisualStudioVersion = 17.4.33103.184
 | 
				
			||||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
					MinimumVisualStudioVersion = 10.0.40219.1
 | 
				
			||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C0ffee's RJW Ideology Addons", "C0ffee's RJW Ideology Addons.csproj", "{D46BAA34-7459-482F-B152-321C071DCE18}"
 | 
					Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C0ffee's RJW Ideology Addons", "C0ffee's RJW Ideology Addons.csproj", "{D46BAA34-7459-482F-B152-321C071DCE18}"
 | 
				
			||||||
EndProject
 | 
					EndProject
 | 
				
			||||||
| 
						 | 
					@ -15,16 +15,16 @@ Global
 | 
				
			||||||
		Release|Any CPU = Release|Any CPU
 | 
							Release|Any CPU = Release|Any CPU
 | 
				
			||||||
	EndGlobalSection
 | 
						EndGlobalSection
 | 
				
			||||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
						GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
				
			||||||
		{D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
							{D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
							{D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
		{D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
							{D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
							{D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
		{01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
							{01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
							{01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
		{01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
							{01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
							{01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
		{212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
							{212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
							{212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
		{212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
							{212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
				
			||||||
		{212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
							{212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
				
			||||||
	EndGlobalSection
 | 
						EndGlobalSection
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										18
									
								
								CRIALactation/1.4/Languages/English/Keyed/CRIALaction.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								CRIALactation/1.4/Languages/English/Keyed/CRIALaction.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="utf-8" ?>
 | 
				
			||||||
 | 
					<LanguageData>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CRIALactationSettings.settings>RJW - C0ffee's RJW Ideology Addons - Lactation</CRIALactationSettings.settings>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CRIALactation.massageCooldown>Massage Cooldown</CRIALactation.massageCooldown>
 | 
				
			||||||
 | 
						<CRIALactation.massageCooldownDesc>Default 0.3. Time between massages to stimulate lacation. 1 = A full day. Changing this number will not update existing cooldown Hediffs, it will only apply to new cooldown hediffs applied.</CRIALactation.massageCooldownDesc>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CRIALactation.totalMassagesUntilLactation>Total Massages Needed</CRIALactation.totalMassagesUntilLactation>
 | 
				
			||||||
 | 
						<CRIALactation.totalMassagesUntilLactationDesc>Default 20. How many massages are required before lacation starts. Progress is saved as 0->1. Each time a massage happens the amount 1/total is added. Changing this value will not reset the current progress amount.</CRIALactation.totalMassagesUntilLactationDesc>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CRIALactation.hucowBreastSizeBonus>Hucow Breast Size Increase</CRIALactation.hucowBreastSizeBonus>
 | 
				
			||||||
 | 
						<CRIALactation.hucowBreastSizeBonusDesc>Default 0.5. When turned into a hucow, this amount will get added to pawns existing breast size.</CRIALactation.hucowBreastSizeBonusDesc>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<CRIALactation.hucowBreastSizeMinimum>Hucow Breast Size Minimum</CRIALactation.hucowBreastSizeMinimum>
 | 
				
			||||||
 | 
						<CRIALactation.hucowBreastSizeMinimumDesc>Default 1.0. When turned into a hucow, this is the smallest that breasts will end up being.</CRIALactation.hucowBreastSizeMinimumDesc>
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					</LanguageData>
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@
 | 
				
			||||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
					  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
				
			||||||
    <DebugType>pdbonly</DebugType>
 | 
					    <DebugType>pdbonly</DebugType>
 | 
				
			||||||
    <Optimize>true</Optimize>
 | 
					    <Optimize>true</Optimize>
 | 
				
			||||||
    <OutputPath>bin\Release\</OutputPath>
 | 
					    <OutputPath>1.4\Assemblies\</OutputPath>
 | 
				
			||||||
    <DefineConstants>TRACE</DefineConstants>
 | 
					    <DefineConstants>TRACE</DefineConstants>
 | 
				
			||||||
    <ErrorReport>prompt</ErrorReport>
 | 
					    <ErrorReport>prompt</ErrorReport>
 | 
				
			||||||
    <WarningLevel>4</WarningLevel>
 | 
					    <WarningLevel>4</WarningLevel>
 | 
				
			||||||
| 
						 | 
					@ -45,7 +45,7 @@
 | 
				
			||||||
      <Private>False</Private>
 | 
					      <Private>False</Private>
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
    <Reference Include="Milk">
 | 
					    <Reference Include="Milk">
 | 
				
			||||||
      <HintPath>..\..\rjw-mc\1.3\Assemblies\Milk.dll</HintPath>
 | 
					      <HintPath>..\..\rjw-mc\1.4\Assemblies\Milk.dll</HintPath>
 | 
				
			||||||
      <Private>False</Private>
 | 
					      <Private>False</Private>
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
    <Reference Include="RJW">
 | 
					    <Reference Include="RJW">
 | 
				
			||||||
| 
						 | 
					@ -70,6 +70,7 @@
 | 
				
			||||||
    </Reference>
 | 
					    </Reference>
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
 | 
					    <Compile Include="Source\LactationSettings.cs" />
 | 
				
			||||||
    <Compile Include="Properties\AssemblyInfo.cs" />
 | 
					    <Compile Include="Properties\AssemblyInfo.cs" />
 | 
				
			||||||
    <Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityBeginInducingLactation.cs" />
 | 
					    <Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityBeginInducingLactation.cs" />
 | 
				
			||||||
    <Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityConvertHucow.cs" />
 | 
					    <Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityConvertHucow.cs" />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,10 +13,10 @@
 | 
				
			||||||
		<stages>
 | 
							<stages>
 | 
				
			||||||
			<li>
 | 
								<li>
 | 
				
			||||||
				<statFactors>
 | 
									<statFactors>
 | 
				
			||||||
					<MilkProductionYield>2.75</MilkProductionYield>
 | 
										<MilkProductionYield>2.5</MilkProductionYield> <!-- this will pair up with MC hediffs. With the hyper lact max x2 you'll end up with x5! -->
 | 
				
			||||||
					<MilkProductionSpeed>0.5</MilkProductionSpeed>
 | 
										<MilkProductionSpeed>1.5</MilkProductionSpeed> <!-- this will pair up with MC hediffs-->
 | 
				
			||||||
					<WorkSpeedGlobal>0.4</WorkSpeedGlobal>
 | 
										<WorkSpeedGlobal>0.7</WorkSpeedGlobal>
 | 
				
			||||||
					<MoveSpeed>0.65</MoveSpeed>
 | 
										<MoveSpeed>0.7</MoveSpeed>
 | 
				
			||||||
				</statFactors>
 | 
									</statFactors>
 | 
				
			||||||
			</li>
 | 
								</li>
 | 
				
			||||||
		</stages>
 | 
							</stages>
 | 
				
			||||||
| 
						 | 
					@ -25,22 +25,38 @@
 | 
				
			||||||
	<HediffDef ParentName="RoleStatBuff">
 | 
						<HediffDef ParentName="RoleStatBuff">
 | 
				
			||||||
		<defName>InducingLactation</defName>
 | 
							<defName>InducingLactation</defName>
 | 
				
			||||||
		<label>inducing lactation</label>
 | 
							<label>inducing lactation</label>
 | 
				
			||||||
		<description>This person's breasts are being encouraged to lactate. This is a long, arduous process of breast and nipple stimulation. It causes feelings of soreness and swelling that ends once milk begins expressing.</description>
 | 
							<description>This person's breasts are being encouraged to lactate. This is a long, arduous process of breast and nipple stimulation.</description>
 | 
				
			||||||
		<hediffClass>HediffWithComps</hediffClass>
 | 
							<hediffClass>HediffWithComps</hediffClass>
 | 
				
			||||||
		<comps>
 | 
							<comps>
 | 
				
			||||||
			<li Class="HediffCompProperties_DisappearsOnDeath" />
 | 
								<li Class="HediffCompProperties_DisappearsOnDeath" />
 | 
				
			||||||
			<li Class="CRIALactation.HediffCompProperties_LactationInduction" />
 | 
								<!--<li Class="CRIALactation.HediffCompProperties_LactationInduction" />--> 
 | 
				
			||||||
 | 
								<!-- changed this up to use severity from a new hediff for the cooldown so it can be adjusted in settings easily-->
 | 
				
			||||||
		</comps>
 | 
							</comps>
 | 
				
			||||||
		<isBad>false</isBad>
 | 
							<isBad>false</isBad>
 | 
				
			||||||
 | 
							<initialSeverity>0.01</initialSeverity> <!--lactation starts at severity 1. there are settings in game to adjust the gain rate-->
 | 
				
			||||||
 | 
						</HediffDef>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<HediffDef>
 | 
				
			||||||
 | 
							<defName>InducingLactationCooldown</defName>
 | 
				
			||||||
 | 
							<label>induced lactation recently</label>
 | 
				
			||||||
 | 
							<hediffClass>HediffWithComps</hediffClass>
 | 
				
			||||||
 | 
							<description>This person's breasts are being encouraged to lactate and have been encouraged recently. This causes feelings of soreness, swelling and discomfort.</description>
 | 
				
			||||||
 | 
							<defaultLabelColor>(1, 0.50, 0.50)</defaultLabelColor>
 | 
				
			||||||
 | 
							<isBad>false</isBad>
 | 
				
			||||||
 | 
							<initialSeverity>0.3</initialSeverity>
 | 
				
			||||||
 | 
							<comps>
 | 
				
			||||||
 | 
								<li Class="HediffCompProperties_SeverityPerDay">
 | 
				
			||||||
 | 
									<severityPerDay>-1</severityPerDay>
 | 
				
			||||||
 | 
								</li>
 | 
				
			||||||
 | 
							</comps>
 | 
				
			||||||
		<stages>
 | 
							<stages>
 | 
				
			||||||
			<li>
 | 
								<li>
 | 
				
			||||||
				<statFactors>
 | 
									<statFactors>
 | 
				
			||||||
					<MilkProductionYield>2.75</MilkProductionYield>
 | 
										<WorkSpeedGlobal>0.9</WorkSpeedGlobal>
 | 
				
			||||||
					<MilkProductionSpeed>0.5</MilkProductionSpeed>
 | 
										<MoveSpeed>0.9</MoveSpeed>
 | 
				
			||||||
					<WorkSpeedGlobal>0.4</WorkSpeedGlobal>
 | 
					 | 
				
			||||||
					<MoveSpeed>0.65</MoveSpeed>
 | 
					 | 
				
			||||||
				</statFactors>
 | 
									</statFactors>
 | 
				
			||||||
			</li>
 | 
								</li>
 | 
				
			||||||
		</stages>
 | 
							</stages>
 | 
				
			||||||
	</HediffDef>
 | 
						</HediffDef>
 | 
				
			||||||
 | 
						
 | 
				
			||||||
</Defs>
 | 
					</Defs>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,6 +30,15 @@ namespace CRIALactation
 | 
				
			||||||
            base.Apply(target, dest);
 | 
					            base.Apply(target, dest);
 | 
				
			||||||
            Pawn pawn = target.Pawn;
 | 
					            Pawn pawn = target.Pawn;
 | 
				
			||||||
            LactationUtility.ExtendLactationDuration(pawn);
 | 
					            LactationUtility.ExtendLactationDuration(pawn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //let's expand the breasts too!
 | 
				
			||||||
 | 
					            var breastList = pawn.GetBreastList();
 | 
				
			||||||
 | 
					            if (!breastList.NullOrEmpty())
 | 
				
			||||||
 | 
					                foreach (var breasts in breastList.Where(x => !x.TryGetComp<CompHediffBodyPart>().FluidType.NullOrEmpty()))
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    breasts.Severity += LactationSettings.hucowBreastSizeBonus; //this could make some big ones rediculous.
 | 
				
			||||||
 | 
					                    if (breasts.Severity < LactationSettings.hucowBreastSizeMinimum) breasts.Severity = LactationSettings.hucowBreastSizeMinimum; 
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,8 +22,11 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override string CompInspectStringExtra()
 | 
					        public override string CompInspectStringExtra()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            //if ((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null
 | 
				
			||||||
 | 
					            //    && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp<HediffComp_LactationInduction>().canMassage())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if ((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null
 | 
					            if ((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null
 | 
				
			||||||
                && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp<HediffComp_LactationInduction>().canMassage())
 | 
					                && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown) == null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return "Ready to stimulate breasts for lactation.";
 | 
					                return "Ready to stimulate breasts for lactation.";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,7 @@ namespace CRIALactation
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                CompIngredients ingredients = foodSource.TryGetComp<CompIngredients>();
 | 
					                CompIngredients ingredients = foodSource.TryGetComp<CompIngredients>();
 | 
				
			||||||
                if (foodDef == ThingDefOf_Milk.HumanMilk || foodDef == ThingDefOf_Milk.HumanoidMilk || foodDef.defName == "VCE_HumanoidCheese" || foodDef.defName == "cheese")
 | 
					                if (foodDef == ThingDefOf_Milk.HumanMilk || foodDef == ThingDefOf_Milk.HumanoidMilk || foodDef == ThingDefOf_Milk.HumanMilkBulk || foodDef == ThingDefOf_Milk.HumanoidMilkBulk || foodDef.defName == "VCE_HumanoidCheese" || foodDef.defName == "cheese")
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkRaw, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef));
 | 
					                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkRaw, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,7 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                else if (ingredients == null
 | 
					                else if (ingredients == null
 | 
				
			||||||
                    || !(ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilk) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilk)))
 | 
					                    || !(ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilk) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilk)) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilkBulk)) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilkBulk)))
 | 
				
			||||||
                    && !LactationUtility.IsHucow(ingester)) {
 | 
					                    && !LactationUtility.IsHucow(ingester)) {
 | 
				
			||||||
                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankNonMilkMeal, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef));
 | 
					                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankNonMilkMeal, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef));
 | 
				
			||||||
                    __result = ___ingestThoughts;
 | 
					                    __result = ___ingestThoughts;
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ namespace CRIALactation
 | 
				
			||||||
            if (ingester.Ideo != null)
 | 
					            if (ingester.Ideo != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk || ingredient.defName == "VCE_HumanoidCheese" || ingredient.defName == "cheese")
 | 
					                if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk || ingredient == ThingDefOf_Milk.HumanoidMilkBulk || ingredient == ThingDefOf_Milk.HumanMilkBulk || ingredient.defName == "VCE_HumanoidCheese" || ingredient.defName == "cheese")
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory);
 | 
					                    AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -77,6 +77,8 @@ namespace CRIALactation
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilk);
 | 
					                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilk);
 | 
				
			||||||
                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilk);
 | 
					                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilk);
 | 
				
			||||||
 | 
					                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilkBulk);
 | 
				
			||||||
 | 
					                compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilkBulk);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ namespace CRIALactation
 | 
				
			||||||
        public static void Prefix(Thing __instance, Pawn ingester)
 | 
					        public static void Prefix(Thing __instance, Pawn ingester)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if(__instance?.def == ThingDefOf_Milk.HumanMilk || __instance?.def == ThingDefOf_Milk.HumanoidMilk)
 | 
					            if(__instance?.def == ThingDefOf_Milk.HumanMilk || __instance?.def == ThingDefOf_Milk.HumanoidMilk || __instance?.def == ThingDefOf_Milk.HumanMilkBulk || __instance?.def == ThingDefOf_Milk.HumanoidMilkBulk)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (ingester.TryGetComp<CompLactation>() == null) return;
 | 
					                if (ingester.TryGetComp<CompLactation>() == null) return;
 | 
				
			||||||
                ingester.TryGetComp<CompLactation>().lastHumanLactationIngestedTick = Find.TickManager.TicksGame;
 | 
					                ingester.TryGetComp<CompLactation>().lastHumanLactationIngestedTick = Find.TickManager.TicksGame;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,10 +13,11 @@ using System.Reflection.Emit;
 | 
				
			||||||
namespace CRIALactation
 | 
					namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
    [HarmonyPatch(typeof(HumanCompHasGatherableBodyResource), "CompTick")]
 | 
					    [HarmonyPatch(typeof(HumanCompHasGatherableBodyResource), "CompTick")]
 | 
				
			||||||
    public static class HarmonyPatch_Milk_HumanCompHasGatherableBodyResource
 | 
					    public static class HarmonyPatch_Milk_HumanCompHasGatherableBodyResource
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        /*
 | 
					        
 | 
				
			||||||
        public static void Prefix(HumanCompHasGatherableBodyResource __instance)
 | 
					        public static void Prefix(HumanCompHasGatherableBodyResource __instance)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (!__instance.parent.IsHashIntervalTick(100))
 | 
					            if (!__instance.parent.IsHashIntervalTick(100))
 | 
				
			||||||
| 
						 | 
					@ -45,7 +46,8 @@ namespace CRIALactation
 | 
				
			||||||
                    p.health.AddHediff(HediffDef.Named("Lactating_Permanent"));
 | 
					                    p.health.AddHediff(HediffDef.Named("Lactating_Permanent"));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }*/
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codeInstructions)
 | 
					        public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codeInstructions)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -92,7 +94,9 @@ namespace CRIALactation
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
    [HarmonyPatch(typeof(CompHyperMilkableHuman), "ResourceAmount", MethodType.Getter)]
 | 
					    [HarmonyPatch(typeof(CompHyperMilkableHuman), "ResourceAmount", MethodType.Getter)]
 | 
				
			||||||
    public static class HarmonyPatch_IncreaseYieldForHucowHyperMilkable
 | 
					    public static class HarmonyPatch_IncreaseYieldForHucowHyperMilkable
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					@ -111,5 +115,5 @@ namespace CRIALactation
 | 
				
			||||||
            Pawn p = __instance.parent as Pawn;
 | 
					            Pawn p = __instance.parent as Pawn;
 | 
				
			||||||
            __result *= p.GetStatValue(StatDefOf_Lactation.MilkProductionYield);
 | 
					            __result *= p.GetStatValue(StatDefOf_Lactation.MilkProductionYield);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,6 +23,7 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static HediffDef InducingLactation;
 | 
					        public static HediffDef InducingLactation;
 | 
				
			||||||
        public static HediffDef Hucow;
 | 
					        public static HediffDef Hucow;
 | 
				
			||||||
 | 
					        public static HediffDef InducingLactationCooldown;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@ using Verse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace CRIALactation
 | 
					namespace CRIALactation
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
    public class HediffCompProperties_LactationInduction : HediffCompProperties
 | 
					    public class HediffCompProperties_LactationInduction : HediffCompProperties
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public HediffCompProperties_LactationInduction()
 | 
					        public HediffCompProperties_LactationInduction()
 | 
				
			||||||
| 
						 | 
					@ -14,4 +15,5 @@ namespace CRIALactation
 | 
				
			||||||
            this.compClass = typeof(HediffComp_LactationInduction);
 | 
					            this.compClass = typeof(HediffComp_LactationInduction);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@ using Verse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace CRIALactation
 | 
					namespace CRIALactation
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
    public class HediffComp_LactationInduction : HediffComp
 | 
					    public class HediffComp_LactationInduction : HediffComp
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private readonly int OneDayInTicks = 60000;
 | 
					        private readonly int OneDayInTicks = 60000;
 | 
				
			||||||
| 
						 | 
					@ -23,6 +24,9 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public bool canMassage()
 | 
					        public bool canMassage()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return tickLastMassaged + OneDayInTicks / TimesMassagedADay < GenTicks.TicksGame;
 | 
					            return tickLastMassaged + OneDayInTicks / TimesMassagedADay < GenTicks.TicksGame;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,4 +39,5 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ namespace CRIALactation
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public class JobDriver_MassageBreasts : JobDriver
 | 
					    public class JobDriver_MassageBreasts : JobDriver
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private readonly float WorkTotal = 300f;
 | 
					        private readonly float WorkTotal = 600f;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override bool TryMakePreToilReservations(bool errorOnFailed)
 | 
					        public override bool TryMakePreToilReservations(bool errorOnFailed)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,24 @@ namespace CRIALactation
 | 
				
			||||||
                Pawn p = job.GetTarget(TargetIndex.A).Thing as Pawn;
 | 
					                Pawn p = job.GetTarget(TargetIndex.A).Thing as Pawn;
 | 
				
			||||||
                if (massageProgress >= WorkTotal)
 | 
					                if (massageProgress >= WorkTotal)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp<HediffComp_LactationInduction>().massage(pawn);
 | 
					
 | 
				
			||||||
 | 
					                    Hediff induce = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
 | 
				
			||||||
 | 
					                    induce.Severity += (1f / LactationSettings.totalMassagesUntilLactation);
 | 
				
			||||||
 | 
					                    //0.05f ; //20 times, 3 times a day = 7 days, give or take
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    if (induce.Severity >= 1)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        //p.health.AddHediff(cooldown, 
 | 
				
			||||||
 | 
					                        LactationUtility.StartLactating(p, true);
 | 
				
			||||||
 | 
					                        //remove the other hediff
 | 
				
			||||||
 | 
					                        p.health.RemoveHediff(induce);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    //Add cooldown hediff. This has the pain debuff so i'm going to add it even if you're now lactating. The last one would have still hurt.
 | 
				
			||||||
 | 
					                    Hediff cooldown = HediffMaker.MakeHediff(HediffDefOf_Milk.InducingLactationCooldown, p, null);
 | 
				
			||||||
 | 
					                    cooldown.Severity = LactationSettings.massageCooldown;
 | 
				
			||||||
 | 
					                    p.health.AddHediff(cooldown, null, null, null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    return JobCondition.Succeeded;
 | 
					                    return JobCondition.Succeeded;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										93
									
								
								CRIALactation/Source/LactationSettings.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								CRIALactation/Source/LactationSettings.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,93 @@
 | 
				
			||||||
 | 
					using HugsLib.Settings;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using UnityEngine;
 | 
				
			||||||
 | 
					using Verse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace CRIALactation
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class LactationSettings : ModSettings
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static float massageCooldown = 0.3f;
 | 
				
			||||||
 | 
					        public static int totalMassagesUntilLactation = 20;  // severity += 1 / this amount
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static float hucowBreastSizeBonus = 0f; //size increase when changed to hucow
 | 
				
			||||||
 | 
					        public static float hucowBreastSizeMinimum = 0.5f; //smallest size breasts can end up.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private static Vector2 scrollPosition;
 | 
				
			||||||
 | 
					        private static float height_modifier = 300f;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static void DoWindowContents(Rect inRect)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //30f for top page description and bottom close button
 | 
				
			||||||
 | 
					            Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //-16 for slider, height_modifier - additional height for hidden options toggles
 | 
				
			||||||
 | 
					            Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Listing_Standard listingStandard = new Listing_Standard();
 | 
				
			||||||
 | 
					            listingStandard.maxOneColumn = true;
 | 
				
			||||||
 | 
					            listingStandard.ColumnWidth = viewRect.width - 10f; // / 2.05f;
 | 
				
			||||||
 | 
					            listingStandard.Begin(viewRect);
 | 
				
			||||||
 | 
					            listingStandard.Gap(5f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            listingStandard.Label("CRIALactation.massageCooldown".Translate() + ": " + Math.Round(massageCooldown, 3), -1f, "CRIALactation.massageCooldownDesc".Translate());
 | 
				
			||||||
 | 
					            massageCooldown = (float)listingStandard.Slider(massageCooldown, 0.01f, 1f);
 | 
				
			||||||
 | 
					            listingStandard.Gap(5f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            listingStandard.Label("CRIALactation.totalMassagesUntilLactation".Translate() + ": " + totalMassagesUntilLactation, -1f, "CRIALactation.totalMassagesUntilLactationDesc".Translate());
 | 
				
			||||||
 | 
					            totalMassagesUntilLactation = (int)listingStandard.Slider(totalMassagesUntilLactation, 1, 100);
 | 
				
			||||||
 | 
					            listingStandard.Gap(10f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            listingStandard.Label("CRIALactation.hucowBreastSizeBonus".Translate() + ": " + Math.Round(hucowBreastSizeBonus, 3), -1f, "CRIALactation.hucowBreastSizeBonusDesc".Translate());
 | 
				
			||||||
 | 
					            hucowBreastSizeBonus = (float)listingStandard.Slider(hucowBreastSizeBonus, 0f, 1f);
 | 
				
			||||||
 | 
					            listingStandard.Gap(5f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            listingStandard.Label("CRIALactation.hucowBreastSizeMinimum".Translate() + ": " + Math.Round(hucowBreastSizeMinimum, 3), -1f, "CRIALactation.hucowBreastSizeMinimumDesc".Translate());
 | 
				
			||||||
 | 
					            hucowBreastSizeMinimum = (float)listingStandard.Slider(hucowBreastSizeMinimum, 0.1f, 5f);
 | 
				
			||||||
 | 
					            listingStandard.Gap(5f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            listingStandard.End();
 | 
				
			||||||
 | 
					            Widgets.EndScrollView();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override void ExposeData()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            base.ExposeData();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            Scribe_Values.Look(ref massageCooldown, "massageCooldown", massageCooldown, true);
 | 
				
			||||||
 | 
					            Scribe_Values.Look(ref totalMassagesUntilLactation, "totalMassagesUntilLactation", totalMassagesUntilLactation, true);
 | 
				
			||||||
 | 
					            Scribe_Values.Look(ref hucowBreastSizeBonus, "hucowBreastSizeBonus", hucowBreastSizeBonus, true);
 | 
				
			||||||
 | 
					            Scribe_Values.Look(ref hucowBreastSizeMinimum, "hucowBreastSizeMinimum", hucowBreastSizeMinimum, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace CRIALactation.Settings
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class LactationSettingsMain : Mod
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public LactationSettingsMain(ModContentPack content) : base(content)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            GetSettings<LactationSettings>();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override string SettingsCategory()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            return "CRIALactationSettings.settings".Translate();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public override void DoSettingsWindowContents(Rect inRect)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            LactationSettings.DoWindowContents(inRect);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -21,14 +21,13 @@ namespace CRIALactation
 | 
				
			||||||
                p.health.hediffSet.HasHediff(HediffDefOf_Milk.Lactating_Permanent, false) ||
 | 
					                p.health.hediffSet.HasHediff(HediffDefOf_Milk.Lactating_Permanent, false) ||
 | 
				
			||||||
                p.health.hediffSet.HasHediff(HediffDefOf_Milk.Heavy_Lactating_Permanent, false);
 | 
					                p.health.hediffSet.HasHediff(HediffDefOf_Milk.Heavy_Lactating_Permanent, false);
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static bool HasMilkableBreasts(Pawn p)
 | 
					        public static bool HasMilkableBreasts(Pawn p)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (p.TryGetComp<CompMilkableHuman>() == null) return false;
 | 
					            if (p.TryGetComp<CompMilkableHuman>() == null) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (Genital_Helper.has_breasts(p) && (MilkBase.flatChestGivesMilk || !Genital_Helper.has_male_breasts(p)))
 | 
					            if (Genital_Helper.has_breasts(p) && (MilkSettings.flatChestGivesMilk || !Genital_Helper.has_male_breasts(p)))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return true;
 | 
					                return true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -39,8 +38,10 @@ namespace CRIALactation
 | 
				
			||||||
        public static void StartLactating(Pawn p, bool natural)
 | 
					        public static void StartLactating(Pawn p, bool natural)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff lactating = HediffMaker.MakeHediff(HediffDefOf_Milk.Lactating_Natural, p, null);
 | 
					            Hediff lactating = HediffMaker.MakeHediff(HediffDefOf_Milk.Lactating_Natural, p, null);
 | 
				
			||||||
            lactating.Severity = Rand.Value;
 | 
					            lactating.Severity = 1;// Rand.Value;
 | 
				
			||||||
            p.health.AddHediff(lactating, Genital_Helper.get_breastsBPR(p));
 | 
					            p.health.AddHediff(lactating, null, null, null);
 | 
				
			||||||
 | 
					            //just adding to base body, not to breasts. Just in case the target has multiple breasts so to not confuse
 | 
				
			||||||
 | 
					            //p.health.AddHediff(lactating, Genital_Helper.get_breastsBPR(p));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static void StopBeingHucow(Pawn p)
 | 
					        public static void StopBeingHucow(Pawn p)
 | 
				
			||||||
| 
						 | 
					@ -56,7 +57,9 @@ namespace CRIALactation
 | 
				
			||||||
        public static bool isMassageable(Pawn p)
 | 
					        public static bool isMassageable(Pawn p)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff lactationInductionHediff = p.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
 | 
					            Hediff lactationInductionHediff = p.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
 | 
				
			||||||
 | 
					            Hediff lactationInductionCooldownHediff = p.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown);
 | 
				
			||||||
            if (lactationInductionHediff == null) return false;
 | 
					            if (lactationInductionHediff == null) return false;
 | 
				
			||||||
 | 
					            if (lactationInductionCooldownHediff != null) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,15 +71,27 @@ namespace CRIALactation
 | 
				
			||||||
            var drugLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Drug);
 | 
					            var drugLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Drug);
 | 
				
			||||||
            if(drugLact != null)
 | 
					            if(drugLact != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                drugLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
 | 
					                drugLact.Severity = 1;
 | 
				
			||||||
 | 
					                //drugLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var naturalLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Natural);
 | 
					            var naturalLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Natural);
 | 
				
			||||||
            if (naturalLact != null)
 | 
					            if (naturalLact != null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                naturalLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
 | 
					                naturalLact.Severity = 1;
 | 
				
			||||||
 | 
					                //naturalLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (ModsConfig.BiotechActive)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                var hediffLactBT = p.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Lactating"));
 | 
				
			||||||
 | 
					                if (hediffLactBT != null)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    hediffLactBT.Severity = 1;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,5 +20,9 @@ namespace CRIALactation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static ThingDef HumanoidMilk;
 | 
					        public static ThingDef HumanoidMilk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static ThingDef HumanMilkBulk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static ThingDef HumanoidMilkBulk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ namespace CRIALactation
 | 
				
			||||||
    public abstract class SpecialThingFilterWorker_MilkBase : SpecialThingFilterWorker
 | 
					    public abstract class SpecialThingFilterWorker_MilkBase : SpecialThingFilterWorker
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected bool IsHumanMilk(ThingDef t) => t == ThingDefOf_Milk.HumanMilk || t == ThingDefOf_Milk.HumanoidMilk;
 | 
					        protected bool IsHumanMilk(ThingDef t) => t == ThingDefOf_Milk.HumanMilk || t == ThingDefOf_Milk.HumanoidMilk || t == ThingDefOf_Milk.HumanoidMilkBulk || t == ThingDefOf_Milk.HumanMilkBulk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		protected bool IsHumanMilk(Thing t) => IsHumanMilk(t.def);
 | 
							protected bool IsHumanMilk(Thing t) => IsHumanMilk(t.def);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,8 +43,12 @@ namespace CRIALactation
 | 
				
			||||||
            Hediff lactationInductionHediff = pawn2?.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
 | 
					            Hediff lactationInductionHediff = pawn2?.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation);
 | 
				
			||||||
            if (lactationInductionHediff == null) return false;
 | 
					            if (lactationInductionHediff == null) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            HediffComp_LactationInduction lactInductComp = lactationInductionHediff.TryGetComp<HediffComp_LactationInduction>();
 | 
					            //we have the cooldown
 | 
				
			||||||
            return p != pawn2 && lactInductComp.canMassage() && !pawn2.Downed && !pawn2.Drafted && !pawn2.InAggroMentalState && !pawn2.IsFormingCaravan() && pawn2.CanCasuallyInteractNow(false, true, false) && p.CanReserve(pawn2, 1, -1, null, forced);
 | 
					            Hediff lactationInductionCooldownHediff = pawn2?.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown);
 | 
				
			||||||
 | 
					            if (lactationInductionCooldownHediff != null) return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //HediffComp_LactationInduction lactInductComp = lactationInductionHediff.TryGetComp<HediffComp_LactationInduction>();
 | 
				
			||||||
 | 
					            return p != pawn2 && !pawn2.Downed && !pawn2.Drafted && !pawn2.InAggroMentalState && !pawn2.IsFormingCaravan() && pawn2.CanCasuallyInteractNow(false, true, false) && p.CanReserve(pawn2, 1, -1, null, forced);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -27,7 +27,7 @@
 | 
				
			||||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
					  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
				
			||||||
    <DebugType>pdbonly</DebugType>
 | 
					    <DebugType>pdbonly</DebugType>
 | 
				
			||||||
    <Optimize>true</Optimize>
 | 
					    <Optimize>true</Optimize>
 | 
				
			||||||
    <OutputPath>bin\Release\</OutputPath>
 | 
					    <OutputPath>1.4\Assemblies\</OutputPath>
 | 
				
			||||||
    <DefineConstants>TRACE</DefineConstants>
 | 
					    <DefineConstants>TRACE</DefineConstants>
 | 
				
			||||||
    <ErrorReport>prompt</ErrorReport>
 | 
					    <ErrorReport>prompt</ErrorReport>
 | 
				
			||||||
    <WarningLevel>4</WarningLevel>
 | 
					    <WarningLevel>4</WarningLevel>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue