Hide history Gizmo when several pawns selected

This commit is contained in:
amevarashi 2022-03-21 08:18:30 +05:00
parent 7ebc0e4878
commit 503fbae7e7
1 changed files with 34 additions and 44 deletions

View File

@ -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;
}
}
}