public static void Prefix(IncidentWorker_Ambush_EnemyFaction __instance, ref IncidentParms parms) { float newPoints = parms.points * LessShittyAmbushMod.settings.enemyFactionMultiplier; Logger.MessageFormat(__instance, "Muliplying enemy faction points: {0} * {1} = {2}", parms.points, LessShittyAmbushMod.settings.enemyFactionMultiplier, newPoints); parms.points = newPoints; }
public static bool Prefix(IncidentWorker_Ambush_EnemyFaction __instance, IncidentParms parms, ref bool __result) { if (__instance != null && __instance.def.defName != "VisitorGroup" && __instance.def.defName != "VisitorGroupMax" && !__instance.def.defName.Contains("Cult") && parms.quest == null && !parms.forced && !__instance.def.workerClass.ToString().StartsWith("Rumor_Code")) { __result = false; return(false); } return(true); }
public static bool Prefix(IncidentWorker_Ambush_EnemyFaction __instance, IncidentParms parms, ref bool __result) { Options.SettingsRef settingsRef = new Options.SettingsRef(); if (settingsRef.restrictEvents) { if (__instance != null && __instance.def.defName != "VisitorGroup" && __instance.def.defName != "VisitorGroupMax" && !__instance.def.defName.Contains("Cult") && parms.quest == null && !parms.forced && !__instance.def.workerClass.ToString().StartsWith("Rumor_Code") && !(parms.faction != null && parms.faction.Hidden)) { __result = false; return(false); } } return(true); }