mirror of
				https://gitgud.io/c0ffeeeeeeee/rjw-events.git
				synced 2024-08-14 23:57:42 +00:00 
			
		
		
		
	tweaks for orgy
This commit is contained in:
		
							parent
							
								
									d57843182c
								
							
						
					
					
						commit
						4c8fa63c50
					
				
					 6 changed files with 50 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue