static void Postfix(PawnsArrivalModeWorker_RandomDrop __instance, IncidentParms parms, ref bool __result) { if (parms.faction.HostileTo(Faction.OfPlayer) && !SpotterUtility.IncidentIsQueued(parms, IncidentDefOf.RaidEnemy)) { __result = !SpotterUtility.TryScanForMotion(parms, IncidentDefOf.RaidEnemy); } }
static void Postfix(PawnsArrivalModeWorker_CenterDrop __instance, IncidentParms parms, ref bool __result) { if (!SpotterUtility.IncidentIsQueued(parms, IncidentDefOf.RaidEnemy)) { __result = !SpotterUtility.TryScanForMotion(parms, IncidentDefOf.RaidEnemy); } }
private static void Postfix(IncidentParms parms, ref bool __result) { if (parms.faction.HostileTo(Faction.OfPlayer) && !SpotterUtility.IncidentIsQueued(parms, IncidentDefOf.RaidEnemy)) { __result = !SpotterUtility.TryScanForMotion(parms, IncidentDefOf.RaidEnemy); } }
public static bool Prefix(IncidentWorker __instance, bool __result, ref IncidentParms parms) { if (!SpotterUtility.IncidentIsQueued(parms, __instance.def)) { if (parms == null) { parms = new IncidentParms(); } return(!SpotterUtility.TryScanForMotion(parms, __instance.def)); } return(true); }
public static bool Prefix(IncidentWorker __instance, bool __result, ref IncidentParms parms) { if (__instance.def.category == IncidentCategoryDefOf.AllyAssistance) { return(true); } if (SpotterUtility.IncidentIsQueued(parms, __instance.def)) { return(true); } if (parms == null) { parms = new IncidentParms(); } return(!SpotterUtility.TryScanForMotion(parms, __instance.def)); }