mirror of
https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
synced 2024-08-14 23:57:25 +00:00
setup
This commit is contained in:
parent
acb98ad4e8
commit
eb4b532a9c
3 changed files with 96 additions and 0 deletions
43
Defs/Recipe_Surgery/Recipes_Surgery_Beautify.xml
Normal file
43
Defs/Recipe_Surgery/Recipes_Surgery_Beautify.xml
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Defs>
|
||||
<RecipeDef Name="Surgery_Beautify_X" Abstract="True">
|
||||
<defName>Surgery_Beautify</defName>
|
||||
<label>beautify</label>
|
||||
<description>Surgically beautifies the pawn.</description>
|
||||
<jobString>beautifying</jobString>
|
||||
<effectWorking>Surgery</effectWorking>
|
||||
<soundWorking>Recipe_Surgery</soundWorking>
|
||||
<workSpeedStat>MedicalOperationSpeed</workSpeedStat>
|
||||
<workSkill>Medicine</workSkill>
|
||||
<workSkillLearnFactor>0.2</workSkillLearnFactor>
|
||||
<workAmount>400</workAmount>
|
||||
<anesthetize>true</anesthetize>
|
||||
<recipeUsers>
|
||||
<li>Human</li>
|
||||
</recipeUsers>
|
||||
<surgerySuccessChanceFactor>95</surgerySuccessChanceFactor>
|
||||
<ingredients>
|
||||
<li>
|
||||
<filter>
|
||||
<categories>
|
||||
<li>Medicine</li>
|
||||
</categories>
|
||||
</filter>
|
||||
<count>1</count>
|
||||
</li>
|
||||
</ingredients>
|
||||
<fixedIngredientFilter>
|
||||
<categories>
|
||||
<li>Medicine</li>
|
||||
</categories>
|
||||
</fixedIngredientFilter>
|
||||
</RecipeDef>
|
||||
<RecipeDef ParentName="Surgery_Beautify_X">
|
||||
<defName>Surgery_Beautify_Base</defName>
|
||||
<label>beautify (base)</label>
|
||||
<description>Surgically beautifies the pawn.</description>
|
||||
<workerClass>RJW_PlasticSurgeries.Recipe_Surgery_Beautify_Base</workerClass>
|
||||
<jobString>beautify the pawn.</jobString>
|
||||
</RecipeDef>
|
||||
</Defs>
|
|
@ -73,6 +73,7 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Recipe_Surgery_Mammoplasty.cs" />
|
||||
<Compile Include="Recipe_Surgery_Sphinctoplasty.cs" />
|
||||
<Compile Include="Recipe_Surgery_Beautify.cs" />
|
||||
<Compile Include="Recipe_Surgery_Vaginoplasty.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -82,6 +83,9 @@
|
|||
<Content Include="..\..\About\Manifest.xml">
|
||||
<Link>About\Manifest.xml</Link>
|
||||
</Content>
|
||||
<Content Include="..\..\Defs\Recipe_Surgery\Recipes_Surgery_Beautify.xml">
|
||||
<Link>Defs\Recipe_Surgery\Recipes_Surgery_Beautify.xml</Link>
|
||||
</Content>
|
||||
<Content Include="..\..\Defs\Recipe_Surgery\Recipes_Surgery_Mammoplasty.xml">
|
||||
<Link>Defs\Recipe_Surgery\Recipes_Surgery_Mammoplasty.xml</Link>
|
||||
</Content>
|
||||
|
|
49
Source/RJW_PlasticSurgeries/Recipe_Surgery_Beautify.cs
Normal file
49
Source/RJW_PlasticSurgeries/Recipe_Surgery_Beautify.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using Dyspareunia;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
public abstract class Recipe_Surgery_Beautify : Recipe_Surgery
|
||||
{
|
||||
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
||||
{
|
||||
var part = Genital_Helper.get_genitalsBPR(pawn);
|
||||
if (part != null)
|
||||
{
|
||||
var hediffs = Genital_Helper.get_PartsHediffList(pawn, part);
|
||||
if (Genital_Helper.has_vagina(pawn, hediffs)) yield return part;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients,
|
||||
Bill bill)
|
||||
{
|
||||
if (billDoer != null)
|
||||
{
|
||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
|
||||
SurgeryResult(pawn);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void SurgeryResult(Pawn pawn);
|
||||
|
||||
protected void SurgeryX(Pawn pawn, float severity)
|
||||
{
|
||||
// pawn.story.traits.HasTrait(Beautiful)
|
||||
// pawn.random_pick_a_trait()
|
||||
}
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Beautify_Base : Recipe_Surgery_Beautify
|
||||
{
|
||||
public override void SurgeryResult(Pawn pawn)
|
||||
{
|
||||
this.SurgeryX(pawn, 0.1f);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue