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

View file

@ -1,13 +1,8 @@
using System; using HarmonyLib;
using RJWSexperience.UI;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse; using Verse;
using HarmonyLib;
using rjw;
using RJWSexperience.UI;
namespace RJWSexperience namespace RJWSexperience
{ {
@ -16,12 +11,13 @@ namespace RJWSexperience
{ {
public static void Postfix(ref IEnumerable<Gizmo> __result, Pawn __instance) public static void Postfix(ref IEnumerable<Gizmo> __result, Pawn __instance)
{ {
if (Find.Selector.NumSelected > 1)
return;
List<Gizmo> gizmoList = __result.ToList(); List<Gizmo> gizmoList = __result.ToList();
AddHistoryGizmo(__instance, ref gizmoList); AddHistoryGizmo(__instance, ref gizmoList);
__result = gizmoList; __result = gizmoList;
} }
@ -43,15 +39,9 @@ namespace RJWSexperience
{ {
SexStatusWindow.ToggleWindow(pawn, history); SexStatusWindow.ToggleWindow(pawn, history);
} }
}; };
return gizmo; return gizmo;
} }
} }
} }