Fixed pussyheal and added a check if target is allowed to have sex.
This commit is contained in:
parent
f6bb11d6a4
commit
f548a48152
Binary file not shown.
|
@ -27,7 +27,7 @@
|
||||||
</targetParams>
|
</targetParams>
|
||||||
</verbProperties>
|
</verbProperties>
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="CompProperties_AbilityCoagulate">
|
<li Class="shabe_genesaddons.CompProperties_AbilityPussyHeal"> <!-- needs to be changed when copied to another mod-->
|
||||||
<tendQualityRange>0.4~0.8</tendQualityRange>
|
<tendQualityRange>0.4~0.8</tendQualityRange>
|
||||||
</li>
|
</li>
|
||||||
<li Class="CompProperties_AbilityRequiresCapacity">
|
<li Class="CompProperties_AbilityRequiresCapacity">
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -6,16 +6,17 @@ using System.Threading.Tasks;
|
||||||
using Verse;
|
using Verse;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
|
using rjw;
|
||||||
|
|
||||||
namespace shabe_genesaddons
|
namespace shabe_genesaddons
|
||||||
{
|
{
|
||||||
public class CompAbilityEffect_PussyHeal : CompAbilityEffect
|
public class CompAbilityEffect_PussyHeal : CompAbilityEffect
|
||||||
{
|
{
|
||||||
private new CompProperties_AbilityCoagulate Props
|
private new CompProperties_AbilityPussyHeal Props
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (CompProperties_AbilityCoagulate)this.props;
|
return (CompProperties_AbilityPussyHeal)this.props;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
@ -45,10 +46,20 @@ namespace shabe_genesaddons
|
||||||
|
|
||||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||||
{
|
{
|
||||||
Pawn pawn = target.Pawn;
|
Pawn pawn = target.Pawn;
|
||||||
if (pawn != null)
|
if (pawn != null)
|
||||||
{
|
{
|
||||||
AbilityUtility.ValidateHasTendableWound(pawn, throwMessages, this.parent);
|
//to be replaced with severel checks to make it clear why target is unable to have sex
|
||||||
|
if (!CasualSex_Helper.CanHaveSex(pawn))
|
||||||
|
{
|
||||||
|
if (throwMessages)
|
||||||
|
{
|
||||||
|
Messages.Message(pawn.Name + " is unable to have sex", pawn, MessageTypeDefOf.RejectInput, false);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AbilityUtility.ValidateHasTendableWound(pawn, throwMessages, this.parent);
|
||||||
|
|
||||||
}
|
}
|
||||||
return base.Valid(target, throwMessages);
|
return base.Valid(target, throwMessages);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,16 +8,13 @@ using RimWorld;
|
||||||
|
|
||||||
namespace shabe_genesaddons
|
namespace shabe_genesaddons
|
||||||
{
|
{
|
||||||
// Token: 0x02000F2B RID: 3883
|
|
||||||
public class CompProperties_AbilityPussyHeal : CompProperties_AbilityEffect
|
public class CompProperties_AbilityPussyHeal : CompProperties_AbilityEffect
|
||||||
{
|
{
|
||||||
// Token: 0x06005C32 RID: 23602 RVA: 0x001F45C9 File Offset: 0x001F27C9
|
|
||||||
public CompProperties_AbilityPussyHeal()
|
public CompProperties_AbilityPussyHeal()
|
||||||
{
|
{
|
||||||
this.compClass = typeof(CompAbilityEffect_Coagulate);
|
this.compClass = typeof(CompAbilityEffect_PussyHeal);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Token: 0x0400386B RID: 14443
|
|
||||||
public FloatRange tendQualityRange;
|
public FloatRange tendQualityRange;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue