mirror of
				https://github.com/amevarashi/RJW-Sexperience.git
				synced 2024-08-14 23:54:08 +00:00 
			
		
		
		
	Hide history Gizmo when several pawns selected
This commit is contained in:
		
							parent
							
								
									7ebc0e4878
								
							
						
					
					
						commit
						503fbae7e7
					
				
					 1 changed files with 34 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -1,13 +1,8 @@
 | 
			
		|||
using System;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using RJWSexperience.UI;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using Verse;
 | 
			
		||||
using HarmonyLib;
 | 
			
		||||
using rjw;
 | 
			
		||||
using RJWSexperience.UI;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -16,12 +11,13 @@ namespace RJWSexperience
 | 
			
		|||
	{
 | 
			
		||||
		public static void Postfix(ref IEnumerable<Gizmo> __result, Pawn __instance)
 | 
			
		||||
		{
 | 
			
		||||
			if (Find.Selector.NumSelected > 1)
 | 
			
		||||
				return;
 | 
			
		||||
 | 
			
		||||
			List<Gizmo> gizmoList = __result.ToList();
 | 
			
		||||
 | 
			
		||||
			AddHistoryGizmo(__instance, ref gizmoList);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			__result = gizmoList;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -43,15 +39,9 @@ namespace RJWSexperience
 | 
			
		|||
				{
 | 
			
		||||
					SexStatusWindow.ToggleWindow(pawn, history);
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
			};
 | 
			
		||||
 | 
			
		||||
			return gizmo;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue