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; }
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); }
public static void Postfix(ref IncidentParms parms, ref bool __result) { if (parms.faction != null && !IgnoranceBase.FactionInEligibleTechRange(parms.faction)) { if (IgnoranceSettings.changeQuests) { Faction newFaction = IgnoranceBase.GetRandomEligibleFaction(); if (newFaction != null) { parms.faction = newFaction; return; } return; } else { __result = true; } return; } }
public static void Postfix(Faction f, ref bool __result) { __result = __result && IgnoranceBase.FactionInEligibleTechRange(f); }
public static void Postfix() { IgnoranceBase.playerTechLevel = IgnoranceBase.GetPlayerTech(); }