mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
First Draft naked prowess and racegenedef bugfix
This commit is contained in:
parent
43705b9676
commit
f1e14befbb
11 changed files with 192 additions and 11 deletions
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using Verse.AI;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
//Summary//
|
||||
//Returns invalid if a pawn is not naked
|
||||
//Summary//
|
||||
public class CompAbilityEffect_CasterIsNaked : CompAbilityEffect_WithDest
|
||||
{
|
||||
private new CompProperties_CasterIsNaked Props
|
||||
{
|
||||
get
|
||||
{
|
||||
return (CompProperties_CasterIsNaked)this.props;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool GizmoDisabled(out string reason)
|
||||
{
|
||||
Pawn pawn = this.CasterPawn;
|
||||
if (pawn != null)
|
||||
{
|
||||
//Copied from ThoughtWorker_NudistNude.CurrentStateInternal
|
||||
List<Apparel> wornApparel = pawn.apparel.WornApparel;
|
||||
for (int i = 0; i < wornApparel.Count; i++)
|
||||
{
|
||||
Apparel apparel = wornApparel[i];
|
||||
if (apparel.def.apparel.countsAsClothingForNudity)
|
||||
{
|
||||
for (int j = 0; j < apparel.def.apparel.bodyPartGroups.Count; j++)
|
||||
{
|
||||
if (apparel.def.apparel.bodyPartGroups[j] == BodyPartGroupDefOf.Torso)
|
||||
{
|
||||
reason = pawn.Name + " is not naked";
|
||||
return true;
|
||||
}
|
||||
if (apparel.def.apparel.bodyPartGroups[j] == BodyPartGroupDefOf.Legs)
|
||||
{
|
||||
reason = pawn.Name + " is not naked";
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
reason = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
public class CompProperties_CasterIsNaked : CompProperties_EffectWithDest
|
||||
{
|
||||
public CompProperties_CasterIsNaked()
|
||||
{
|
||||
this.compClass = typeof(CompAbilityEffect_CasterIsNaked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,10 +61,8 @@ namespace RJW_Genes
|
|||
return AlertReport.CulpritsAre(this.Targets);
|
||||
}
|
||||
|
||||
// Token: 0x04004B5C RID: 19292
|
||||
private List<GlobalTargetInfo> targets = new List<GlobalTargetInfo>();
|
||||
|
||||
// Token: 0x04004B5D RID: 19293
|
||||
private List<string> targetLabels = new List<string>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace RJW_Genes
|
|||
if (this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_cum_eater)
|
||||
|| this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_vaginal_absorber) || this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_anal_absorber) || this.Pawn.genes.HasGene(GeneDefOf.rjw_genes_drainer))
|
||||
{
|
||||
//TODO: use mentalstatedef instead of mentalbreakdef
|
||||
MentalBreakDef randomrape = GeneDefOf.rjw_genes_lifeforce_randomrape;
|
||||
if (ModsConfig.BiotechActive &&
|
||||
this.Pawn.Spawned && !this.Pawn.InMentalState && !this.Pawn.Downed &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue