mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Move Recipe_HymenSurgery
This commit is contained in:
parent
518e683dd4
commit
7e3034a300
4 changed files with 53 additions and 64 deletions
|
@ -4,7 +4,7 @@
|
||||||
<defName>Surgery_RestoreHymen</defName>
|
<defName>Surgery_RestoreHymen</defName>
|
||||||
<label>hymenoplasty</label>
|
<label>hymenoplasty</label>
|
||||||
<description>Disguises as virgin.</description>
|
<description>Disguises as virgin.</description>
|
||||||
<workerClass>RJWSexperience.Recipe_HymenSurgery</workerClass>
|
<workerClass>RJWSexperience.Virginity.Recipe_HymenSurgery</workerClass>
|
||||||
<jobString>restoring hymen</jobString>
|
<jobString>restoring hymen</jobString>
|
||||||
<effectWorking>Surgery</effectWorking>
|
<effectWorking>Surgery</effectWorking>
|
||||||
<soundWorking>Recipe_Surgery</soundWorking>
|
<soundWorking>Recipe_Surgery</soundWorking>
|
||||||
|
@ -12,10 +12,10 @@
|
||||||
<workSkill>Medicine</workSkill>
|
<workSkill>Medicine</workSkill>
|
||||||
<workSkillLearnFactor>0.2</workSkillLearnFactor>
|
<workSkillLearnFactor>0.2</workSkillLearnFactor>
|
||||||
<workAmount>400</workAmount>
|
<workAmount>400</workAmount>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<recipeUsers>
|
<recipeUsers>
|
||||||
<li>Human</li>
|
<li>Human</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
<surgerySuccessChanceFactor>100</surgerySuccessChanceFactor>
|
<surgerySuccessChanceFactor>100</surgerySuccessChanceFactor>
|
||||||
<ingredients>
|
<ingredients>
|
||||||
<li>
|
<li>
|
||||||
|
@ -33,6 +33,4 @@
|
||||||
</categories>
|
</categories>
|
||||||
</fixedIngredientFilter>
|
</fixedIngredientFilter>
|
||||||
</RecipeDef>
|
</RecipeDef>
|
||||||
|
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
<Compile Include="LustUtility.cs" />
|
<Compile Include="LustUtility.cs" />
|
||||||
<Compile Include="Patches\DefInjection.cs" />
|
<Compile Include="Patches\DefInjection.cs" />
|
||||||
<Compile Include="Patches\GetGizmos.cs" />
|
<Compile Include="Patches\GetGizmos.cs" />
|
||||||
<Compile Include="Recipe_HymenSurgery.cs" />
|
<Compile Include="Virginity\Recipe_HymenSurgery.cs" />
|
||||||
<Compile Include="Settings\SettingsTabHistory.cs" />
|
<Compile Include="Settings\SettingsTabHistory.cs" />
|
||||||
<Compile Include="Settings\SettingsTabDebug.cs" />
|
<Compile Include="Settings\SettingsTabDebug.cs" />
|
||||||
<Compile Include="Settings\IResettable.cs" />
|
<Compile Include="Settings\IResettable.cs" />
|
||||||
|
@ -92,6 +92,7 @@
|
||||||
<Compile Include="UI\SexStatus.cs" />
|
<Compile Include="UI\SexStatus.cs" />
|
||||||
<Compile Include="Utility.cs" />
|
<Compile Include="Utility.cs" />
|
||||||
<Compile Include="VariousDefOf.cs" />
|
<Compile Include="VariousDefOf.cs" />
|
||||||
|
<Compile Include="Virginity\TraitDegree.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Krafs.Rimworld.Ref">
|
<PackageReference Include="Krafs.Rimworld.Ref">
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using RimWorld;
|
|
||||||
using Verse;
|
|
||||||
using rjw;
|
|
||||||
using RJWSexperience.ExtensionMethods;
|
|
||||||
|
|
||||||
namespace RJWSexperience
|
|
||||||
{
|
|
||||||
public class Recipe_HymenSurgery : Recipe_Surgery
|
|
||||||
{
|
|
||||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (pawn.gender != Gender.Female)
|
|
||||||
{
|
|
||||||
yield break;
|
|
||||||
}
|
|
||||||
|
|
||||||
BodyPartRecord part = Genital_Helper.get_genitalsBPR(pawn);
|
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
List<Hediff> hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
|
||||||
if (Genital_Helper.has_vagina(pawn, hediffs) && !pawn.HasHymen())
|
|
||||||
{
|
|
||||||
yield return part;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
|
|
||||||
{
|
|
||||||
if (billDoer != null)
|
|
||||||
{
|
|
||||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
|
|
||||||
{
|
|
||||||
billDoer,
|
|
||||||
pawn
|
|
||||||
});
|
|
||||||
SurgeryResult(pawn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void SurgeryResult(Pawn pawn)
|
|
||||||
{
|
|
||||||
int degree = 1;
|
|
||||||
if (pawn.IsVirgin()) degree = 2;
|
|
||||||
Trait virgin = new Trait(VariousDefOf.Virgin, degree, true);
|
|
||||||
pawn.story.traits.GainTrait(virgin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
using RimWorld;
|
||||||
|
using rjw;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace RJWSexperience.Virginity
|
||||||
|
{
|
||||||
|
public class Recipe_HymenSurgery : Recipe_Surgery
|
||||||
|
{
|
||||||
|
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||||
|
{
|
||||||
|
if (pawn.gender != Gender.Female)
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
BodyPartRecord part = Genital_Helper.get_genitalsBPR(pawn);
|
||||||
|
if (part == null)
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
List<Hediff> hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
||||||
|
if (Genital_Helper.has_vagina(pawn, hediffs) && !pawn.HasHymen())
|
||||||
|
yield return part;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
|
||||||
|
{
|
||||||
|
if (billDoer == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
|
||||||
|
{
|
||||||
|
billDoer,
|
||||||
|
pawn
|
||||||
|
});
|
||||||
|
SurgeryResult(pawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SurgeryResult(Pawn pawn)
|
||||||
|
{
|
||||||
|
TraitDegree degree = TraitDegree.FemaleAfterSurgery;
|
||||||
|
if (pawn.IsVirgin())
|
||||||
|
degree = TraitDegree.FemaleVirgin;
|
||||||
|
Trait virgin = new Trait(VariousDefOf.Virgin, (int)degree, true);
|
||||||
|
pawn.story.traits.GainTrait(virgin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue