Ejemplo n.º 1
0
 static void Postfix(ref IncidentWorker_RaidFriendly __instance, ref bool __result, IncidentParms parms)
 {
     if (parms.faction == FactionColonies.getPlayerColonyFaction())
     {
         parms.faction = null;
         __result      = false;
     }
 }
        public override void Execute(int amount, string boughtBy)
        {
            Map currentMap = Find.CurrentMap;


            IncidentParms parms = StorytellerUtility.DefaultParmsNow(IncidentCategoryDefOf.AllyAssistance, currentMap);

            parms.forced = true;
            //parms.raidArrivalMode = PawnsArrivalModeDefOf.CenterDrop;
            //parms.raidStrategy = RaidStrategyDefOf.ImmediateAttackFriendly;
            parms.raidArrivalModeForQuickMilitaryAid = true;
            parms.points  = DiplomacyTuning.RequestedMilitaryAidPointsRange.RandomInRange;
            parms.faction = Find.FactionManager.RandomAlliedFaction();

            var raidWorker = new IncidentWorker_RaidFriendly();

            raidWorker.def = IncidentDef.Named("RaidFriendly");
            raidWorker.TryExecute(parms);

            AlertManager.NormalEventNotification("Your viewers have sent help from ");
        }