1.4 updates

This commit is contained in:
c0ffee 2022-10-25 13:46:15 -07:00
parent cd8fe17713
commit 6cdd801207
190 changed files with 12627 additions and 43 deletions

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -9,15 +9,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CRIALactation</RootNamespace>
<AssemblyName>CRIALactation</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>1.3\Assemblies\</OutputPath>
<OutputPath>1.4\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -32,24 +33,19 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath>
<Private>False</Private>
<HintPath>..\..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HugsLib">
<HintPath>..\..\..\..\..\workshop\content\294100\818773962\v1.3\Assemblies\HugsLib.dll</HintPath>
<Private>False</Private>
<HintPath>..\..\..\..\..\workshop\content\294100\818773962\v1.4\Assemblies\HugsLib.dll</HintPath>
</Reference>
<Reference Include="Milk">
<HintPath>..\..\rjw-mc\1.3\Assemblies\Milk.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RJW">
<HintPath>..\..\rjw\1.3\Assemblies\RJW.dll</HintPath>
<Private>False</Private>
<HintPath>..\..\rjw\1.4\Assemblies\RJW.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -61,17 +57,17 @@
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityBeginInducingLactation.cs" />
<Compile Include="Source\CompProperties\CompAbilityEffects\CompProperties_AbilityConvertHucow.cs" />
<Compile Include="Source\CompProperties\CompProperties_Lactation.cs" />
<Compile Include="Source\Comps\CompAbilityEffects\CompAbilityEffect_BeginInducingLactation.cs" />
<Compile Include="Source\Comps\CompAbilityEffects\CompAbilityEffect_ConvertHucow.cs" />
<Compile Include="Source\Comps\CompLactation.cs" />
<Compile Include="Source\HarmonyPatches\HarmonyPatch_FoodUtility.cs" />

View file

@ -81,10 +81,10 @@
<comps>
<li Class="CompProperties_AbilityGiveHediff">
<compClass>CompAbilityEffect_GiveHediff</compClass>
<hediffDef>Hucow</hediffDef>
<hediffDef>InducingLactation</hediffDef>
<applicableToMechs>False</applicableToMechs>
</li>
<li Class="CRIALactation.CompProperties_AbilityConvertHucow" />
<li Class="CRIALactation.CompProperties_AbilityBeginInducingLactation" />
</comps>
</AbilityDef>
</Defs>

View file

@ -37,7 +37,7 @@
<iconPath>UI/Issues/Lactating</iconPath>
</IssueDef>
<PreceptDef ParentName="PreceptRoleSingleBase">
<PreceptDef ParentName="PreceptRoleMultiBase">
<defName>IdeoRole_HucowHandler</defName>
<issue>HucowHandling</issue>
<!--this is needed to override old issue in issuedef to have hucow handler role-->
@ -147,6 +147,7 @@
</requiredMemes>
<grantedAbilities>
<li>ConvertToHucow</li>
<li>BeginInducingLactation</li>
</grantedAbilities>
</PreceptDef>

View file

@ -0,0 +1,23 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using RimWorld;
using rjw;
using Milk;
using UnityEngine;
namespace CRIALactation
{
public class CompProperties_AbilityBeginInducingLactation : CompProperties_AbilityEffect
{
public CompProperties_AbilityBeginInducingLactation()
{
this.compClass = typeof(CompAbilityEffect_BeginInducingLactation);
}
}
}

View file

@ -1,5 +1,6 @@
using RimWorld;
using RimWorld.Planet;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
@ -16,8 +17,10 @@ namespace CRIALactation
{
Pawn pawn = target.Pawn;
if (pawn == null) return false;
if (!pawn.IsColonistPlayerControlled || !pawn.IsSlaveOfColony || !pawn.IsPrisonerOfColony) return false;
if (!(pawn.IsColonistPlayerControlled || pawn.IsSlaveOfColony || pawn.IsPrisonerOfColony)) return false;
if (!Genital_Helper.has_breasts(pawn) || Genital_Helper.has_male_breasts(pawn)) return false;
if (LactationUtility.IsLactating(pawn)) return false;
return true;

View file

@ -16,9 +16,9 @@ namespace CRIALactation
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
{
Pawn pawn = target.Pawn;
return pawn != null && AbilityUtility.ValidateMustBeHuman(pawn, throwMessages) &&
AbilityUtility.ValidateNoMentalState(pawn, throwMessages) &&
AbilityUtility.ValidateSameIdeo(this.parent.pawn, pawn, throwMessages) &&
return pawn != null && AbilityUtility.ValidateMustBeHuman(pawn, throwMessages, this.parent) &&
AbilityUtility.ValidateNoMentalState(pawn, throwMessages, this.parent) &&
AbilityUtility.ValidateSameIdeo(this.parent.pawn, pawn, throwMessages, this.parent) &&
LactationUtility.IsLactating(pawn) &&
!LactationUtility.IsHucow(pawn);

View file

@ -19,6 +19,20 @@ namespace CRIALactation
Scribe_Values.Look<int>(ref this.lastHumanLactationIngestedTick, "lastHumanLactationIngestedTick", 0);
}
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())
{
return "Ready to stimulate breasts for lactation.";
}
else
{
return "";
}
}
}

View file

@ -13,9 +13,11 @@ namespace CRIALactation
public class PreceptComp_Lactation : PreceptComp
{
public override void Notify_MemberGenerated(Pawn pawn, Precept precept)
public override void Notify_MemberGenerated(Pawn pawn, Precept precept, bool newborn)
{
if (newborn) return;
if((precept.def == PreceptDefOf_Lactation.Lactating_Essential
|| precept.def == PreceptDefOf_Lactation.Lactating_MandatoryHucow)
&& LactationUtility.HasMilkableBreasts(pawn))