public static void Postfix(FactionDef employer, ref WeightedList <SimGameState.ContractParticipants> __result, string[] __state) { if (Globals.WarStatusTracker == null || Globals.Sim.IsCampaign && !Globals.Sim.CompanyTags.Contains("story_complete")) { return; } employer.Enemies = __state; var type = __result.Type; __result = __result.Distinct().ToWeightedList(type); }