public static void Postfix(ref IEnumerable <IncidentDef> __result)
 {
     __result = from x in __result
                where (!IgnoranceBase.incidentWorkers.ContainsKey(x.workerClass) || IgnoranceBase.TechIsEligibleForIncident(IgnoranceBase.incidentWorkers.TryGetValue(x.workerClass))) &&
                (!IgnoranceBase.incidentDefNames.ContainsKey(x.defName) || IgnoranceBase.TechIsEligibleForIncident(IgnoranceBase.incidentDefNames.TryGetValue(x.defName)))
                select x;
 }
Ejemplo n.º 2
0
        public static bool Prefix(ref bool __result, QuestScriptDef __instance)
        {
            TechLevel questTech;

            if (IgnoranceSettings.changeQuests && IgnoranceBase.questScriptDefs.TryGetValue(__instance.defName, out questTech))
            {
                if (!IgnoranceBase.TechIsEligibleForIncident(questTech))
                {
                    __result = false;
                    return(false);
                }
            }
            return(true);
        }