tweaks for orgy

This commit is contained in:
c0ffee12 2021-07-27 23:10:59 -07:00
parent d57843182c
commit 4c8fa63c50
6 changed files with 50 additions and 6 deletions

View file

@ -11,6 +11,8 @@ namespace RJW_Events
{
class LordJob_Joinable_Orgy : LordJob_Joinable_Party
{
List<Pawn> participants;
protected override ThoughtDef AttendeeThought
{
get
@ -55,7 +57,9 @@ namespace RJW_Events
if (ModLister.IdeologyInstalled)
{
var ideo = p.ideo.Ideo;
if (!ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_FreeApproved", true)))
if (!ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_FreeApproved", true)) &&
!ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_Free", true)))
{
return 0;
}
@ -69,5 +73,36 @@ namespace RJW_Events
{
return timeoutTrigger.TicksLeft < 300;
}
public override void Notify_PawnAdded(Pawn p)
{
if(participants == null)
{
participants = new List<Pawn>();
}
participants.Add(p);
base.Notify_PawnAdded(p);
}
public override void Cleanup()
{
foreach(Pawn participant in participants)
{
if (participant != null)
{
participant.mindState.Notify_OutfitChanged();
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(participant);
if (xxx.is_human(participant))
participant.Drawer.renderer.graphics.ResolveAllGraphics();
}
}
participants = null;
base.Cleanup();
}
}
}