Пример #1
0
 static bool Prefix(IncidentWorker_VisitorGroup __instance, ref bool __result, IncidentParms parms)
 {
     if (IncidentInterceptorUtility.isIntercepting_VisitorGroup)
     {
         IncidentInterceptorUtility.CreateIncidentCaraven_HumanNeutral <InterceptedIncident_HumanCrowd_VisitorGroup>(parms);
     }
     return(true);
 }
        public override bool IsPossible()
        {
            worker     = new IncidentWorker_VisitorGroup();
            worker.def = IncidentDef.Named("VisitorGroup");

            parms = StorytellerUtility.DefaultParmsNow(IncidentCategoryDefOf.Misc, target);

            return(worker.CanFireNow(parms));
        }
        public static List <Pawn> MountAnimals(IncidentWorker_VisitorGroup instance, IncidentParms parms)
        {
            List <Pawn> pawns = Traverse.Create(instance).Method("SpawnPawns", new object[] { parms }).GetValue <List <Pawn> >();

            if (!pawns.NullOrEmpty())
            {
                NPCMountUtility.generateMounts(ref pawns, parms, Base.inBiomeWeight, Base.outBiomeWeight, Base.nonWildWeight, Base.visitorMountChance, Base.visitorMountChanceTribal);
            }
            return(pawns);
        }
 static bool Prefix(IncidentWorker_VisitorGroup __instance, ref bool __result, IncidentParms parms)
 {
     if (PreemptiveStrike.Mod.PES_Settings.DebugModeOn)
     {
         Log.Message("-=PS=- Patch_IncidentWorker_VisitorGroup_TryExecuteWorker Prefix"); //Lt. Bob - Logging
     }
     if (parms != null && parms.questTag != null)                                         //Lt. Bob - "Temporary" bypass fix? for Quest handling
     {
         Log.Message("-=PS=- Patch_IncidentWorker_VisitorGroup_TryExecuteWorker - questTag!=Null == " + parms.questTag);
         Log.Message("-=PS=- Returning true");
         return(true);
     }
     if (IncidentInterceptorUtility.isIntercepting_VisitorGroup)
     {
         return(!IncidentInterceptorUtility.CreateIncidentCaraven_HumanNeutral <InterceptedIncident_HumanCrowd_VisitorGroup>(__instance.def, parms));
     }
     return(true);
 }