mirror of
				https://github.com/Shabakur/RJW_More_.git
				synced 2024-08-14 23:57:04 +00:00 
			
		
		
		
	Fixed pussyheal and added a check if target is allowed to have sex.
This commit is contained in:
		
							parent
							
								
									f6bb11d6a4
								
							
						
					
					
						commit
						f548a48152
					
				
					 7 changed files with 17 additions and 9 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
      </targetParams>
 | 
			
		||||
    </verbProperties>
 | 
			
		||||
    <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>
 | 
			
		||||
      </li>
 | 
			
		||||
      <li Class="CompProperties_AbilityRequiresCapacity">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -6,16 +6,17 @@ using System.Threading.Tasks;
 | 
			
		|||
using Verse;
 | 
			
		||||
using UnityEngine;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
 | 
			
		||||
namespace shabe_genesaddons
 | 
			
		||||
{
 | 
			
		||||
    public class CompAbilityEffect_PussyHeal : CompAbilityEffect
 | 
			
		||||
    {
 | 
			
		||||
		private new CompProperties_AbilityCoagulate Props
 | 
			
		||||
		private new CompProperties_AbilityPussyHeal Props
 | 
			
		||||
		{
 | 
			
		||||
			get
 | 
			
		||||
			{
 | 
			
		||||
				return (CompProperties_AbilityCoagulate)this.props;
 | 
			
		||||
				return (CompProperties_AbilityPussyHeal)this.props;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
 | 
			
		||||
| 
						 | 
				
			
			@ -45,10 +46,20 @@ namespace shabe_genesaddons
 | 
			
		|||
 | 
			
		||||
		public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
 | 
			
		||||
        {
 | 
			
		||||
            Pawn pawn = target.Pawn;
 | 
			
		||||
			Pawn pawn = target.Pawn;
 | 
			
		||||
            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);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,16 +8,13 @@ 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);
 | 
			
		||||
			this.compClass = typeof(CompAbilityEffect_PussyHeal);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Token: 0x0400386B RID: 14443
 | 
			
		||||
		public FloatRange tendQualityRange;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue