mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
initial 1.5
This commit is contained in:
parent
e19b6d8ff3
commit
2f7a1c0883
48 changed files with 6295 additions and 18 deletions
|
@ -2,6 +2,7 @@
|
|||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
|
@ -35,7 +36,7 @@ namespace RJWSexperience.Ideology
|
|||
{
|
||||
if (duty != null)
|
||||
{
|
||||
List<Pawn> pawns = pawn.Map.mapPawns.AllPawnsSpawned.FindAll(x => x.mindState?.duty?.def == duty.def);
|
||||
IEnumerable<Pawn> pawns = pawn.Map.mapPawns.AllPawnsSpawned.Where(x => x.mindState?.duty?.def == duty.def);
|
||||
return pawns.RandomElementByWeightWithDefault(x => SexAppraiser.would_fuck(pawn, x), 0.1f);
|
||||
}
|
||||
|
||||
|
@ -190,7 +191,14 @@ namespace RJWSexperience.Ideology
|
|||
get_loved.AddFinishAction(delegate
|
||||
{
|
||||
if (xxx.is_human(pawn))
|
||||
pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
|
||||
{
|
||||
CompRJW comp = CompRJW.Comp(pawn);
|
||||
if (comp != null)
|
||||
{
|
||||
comp.drawNude = false;
|
||||
pawn.Drawer.renderer.SetAllGraphicsDirty();
|
||||
}
|
||||
}
|
||||
});
|
||||
get_loved.socialMode = RandomSocialMode.Off;
|
||||
return get_loved;
|
||||
|
|
|
@ -135,7 +135,14 @@ namespace RJWSexperience.Ideology
|
|||
get_banged.AddFinishAction(delegate
|
||||
{
|
||||
if (xxx.is_human(pawn))
|
||||
pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
|
||||
{
|
||||
CompRJW comp = CompRJW.Comp(pawn);
|
||||
if (comp != null)
|
||||
{
|
||||
comp.drawNude = false;
|
||||
pawn.Drawer.renderer.SetAllGraphicsDirty();
|
||||
}
|
||||
}
|
||||
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
|
||||
|
||||
if (Bed != null && pawn.Downed)
|
||||
|
|
|
@ -36,14 +36,14 @@ namespace RJWSexperience.Ideology
|
|||
return false;
|
||||
}
|
||||
|
||||
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
|
||||
public override QualityFactor GetQualityFactor(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
|
||||
{
|
||||
return new ExpectedOutcomeDesc
|
||||
return new QualityFactor
|
||||
{
|
||||
label = LabelForDesc.CapitalizeFirst(),
|
||||
present = false,
|
||||
uncertainOutcome = true,
|
||||
effect = ExpectedOffsetDesc(true, -1f),
|
||||
qualityChange = ExpectedOffsetDesc(true, -1f),
|
||||
quality = qualityOffset,
|
||||
positive = true
|
||||
};
|
||||
|
@ -62,22 +62,22 @@ namespace RJWSexperience.Ideology
|
|||
public override bool Applies(LordJob_Ritual ritual)
|
||||
{
|
||||
float avgNeed = 0;
|
||||
foreach (Pawn pawn in ritual.assignments.AllPawns)
|
||||
foreach (Pawn pawn in ritual.assignments.AllCandidatePawns)
|
||||
{
|
||||
avgNeed += pawn.needs?.TryGetNeed(needDef)?.CurLevel ?? 0f;
|
||||
}
|
||||
avgNeed /= ritual.assignments.AllPawns.Count;
|
||||
avgNeed /= ritual.assignments.AllCandidatePawns.Count;
|
||||
return avgNeed >= minAvgNeed;
|
||||
}
|
||||
|
||||
public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
|
||||
public override QualityFactor GetQualityFactor(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
|
||||
{
|
||||
return new ExpectedOutcomeDesc
|
||||
return new QualityFactor
|
||||
{
|
||||
label = LabelForDesc.CapitalizeFirst(),
|
||||
present = false,
|
||||
uncertainOutcome = true,
|
||||
effect = ExpectedOffsetDesc(true, -1f),
|
||||
qualityChange = ExpectedOffsetDesc(true, -1f),
|
||||
quality = qualityOffset,
|
||||
positive = true
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue