Made sexheal which is coagulate copy
This commit is contained in:
parent
b49a91af03
commit
f6bb11d6a4
Binary file not shown.
|
@ -1,15 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<!-- Mechbreeder -->
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_mechbreeder</defName>
|
||||
<label>Mechbreeder</label>
|
||||
<description>Pawns with this gene are able to birth mechanoids unharmed.</description>
|
||||
<iconPath>World/WorldObjects/Expanding/Mechanoids</iconPath>
|
||||
<displayOrderInCategory>51</displayOrderInCategory>
|
||||
<displayCategory>Reproduction</displayCategory>
|
||||
</GeneDef>
|
||||
|
||||
<GeneDef>
|
||||
<defName>rjw_genes_pussyhealer</defName>
|
||||
<label>Pussy Healer</label>
|
||||
|
@ -18,10 +8,10 @@
|
|||
<iconPath>UI/Icons/Genes/Gene_Coagulate</iconPath>
|
||||
<displayCategory>Ability</displayCategory>
|
||||
<abilities>
|
||||
<li>Coagulate</li>
|
||||
<li>PussyHeal</li>
|
||||
</abilities>
|
||||
<descriptionHyperlinks>
|
||||
<AbilityDef>Coagulate</AbilityDef>
|
||||
<AbilityDef>PussyHeal</AbilityDef>
|
||||
</descriptionHyperlinks>
|
||||
<biostatMet>-1</biostatMet>
|
||||
<minAgeActive>3</minAgeActive>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
using RimWorld;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
public class CompAbilityEffect_PussyHeal : CompAbilityEffect
|
||||
{
|
||||
private new CompProperties_AbilityCoagulate Props
|
||||
{
|
||||
get
|
||||
{
|
||||
return (CompProperties_AbilityCoagulate)this.props;
|
||||
}
|
||||
}
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
base.Apply(target, dest);
|
||||
Pawn pawn = target.Pawn;
|
||||
if (pawn == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = 0;
|
||||
List<Hediff> hediffs = pawn.health.hediffSet.hediffs;
|
||||
for (int i = hediffs.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if ((hediffs[i] is Hediff_Injury || hediffs[i] is Hediff_MissingPart) && hediffs[i].TendableNow(false))
|
||||
{
|
||||
hediffs[i].Tended(this.Props.tendQualityRange.RandomInRange, this.Props.tendQualityRange.TrueMax, 1);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (num > 0)
|
||||
{
|
||||
MoteMaker.ThrowText(pawn.DrawPos, pawn.Map, "NumWoundsTended".Translate(num), 3.65f);
|
||||
}
|
||||
FleckMaker.AttachedOverlay(pawn, FleckDefOf.FlashHollow, Vector3.zero, 1.5f, -1f);
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
Pawn pawn = target.Pawn;
|
||||
if (pawn != null)
|
||||
{
|
||||
AbilityUtility.ValidateHasTendableWound(pawn, throwMessages, this.parent);
|
||||
}
|
||||
return base.Valid(target, throwMessages);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace shabe_genesaddons
|
||||
{
|
||||
// Token: 0x02000F2B RID: 3883
|
||||
public class CompProperties_AbilityPussyHeal : CompProperties_AbilityEffect
|
||||
{
|
||||
// Token: 0x06005C32 RID: 23602 RVA: 0x001F45C9 File Offset: 0x001F27C9
|
||||
public CompProperties_AbilityPussyHeal()
|
||||
{
|
||||
this.compClass = typeof(CompAbilityEffect_Coagulate);
|
||||
}
|
||||
|
||||
// Token: 0x0400386B RID: 14443
|
||||
public FloatRange tendQualityRange;
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
c1c0f4fe54bc76d32a3a02d0a8c80a72c6c5e818
|
||||
5a8b4a39089fb64409d7431a53405d599f8307c0
|
||||
|
|
Binary file not shown.
|
@ -57,6 +57,8 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CompAbilityEffect_PussyHeal.cs" />
|
||||
<Compile Include="CompProperties_AbilityPussyHeal.cs" />
|
||||
<Compile Include="GeneDefOf.cs" />
|
||||
<Compile Include="HarmonyInit.cs" />
|
||||
<Compile Include="PatchMechBirth.cs" />
|
||||
|
|
Loading…
Reference in New Issue