public static void Postfix() { if (Current.Game != null && StoryHandler.showExtraInfo) { StoryHandler.MissionInfoOnGUI(); } }
public static void Postfix(Thing __instance, bool respawningAfterLoad) { if ((__instance?.Map?.IsPlayerHome ?? false) && __instance.def.mote == null) { StoryHandler.Missions.ForEach(m => m.objectives.Where(o => o.CurrentState == MOState.Active).Do(o => { o.thingTracker?.ProcessTarget(__instance.def, __instance.Position, __instance.Map, ObjectiveType.MapCheck, __instance, __instance as Pawn); })); Dictionary<ObjectiveDef, List<ThingDef>> stations = StoryHandler.StationDefs(); foreach (ObjectiveDef objective in stations.Keys) { if (stations[objective].Contains(__instance.def)) { bool active = __instance.TryGetComp<CompPowerTrader>()?.PowerOn ?? true; ObjectiveStation station = StoryHandler.AllStations.Station(null, __instance); if (station != null) { if (!station.objectives.Contains(objective)) { station.objectives.Add(objective); } return; } StoryHandler.AllStations.Add(new ObjectiveStation(__instance, objective, active)); } } } }
public static void JobDriver_PostFix(JobDriver __instance, bool __result) { if (__result) { StoryHandler.Notify_JobStarted(__instance.job.def, __instance.GetActor()); } }
public static void Postfix(ref bool actuallyTraded) { if (actuallyTraded) { profit -= TradeSession.deal.SilverTradeable.CountHeldBy(Transactor.Colony); FactionDef def = TradeSession.trader.Faction.def; StoryHandler.Notify_Interacted(def, TravelMode.Trade, -profit); } }
public static void JobDriver_PostFix(JobDriver __instance, bool __result) { if (__result) { Action newAction = delegate { StoryHandler.Notify_JobStarted(__instance.job.def, __instance.GetActor()); }; LongEventHandler.ExecuteWhenFinished(newAction); } }
public static void Postfix(FiringIncident fi, bool __result) { StoryHandler.Notify_IncidentFired(fi.def); }
public static void Postfix(Caravan caravan, SettlementBase settlement) { FactionDef def = settlement.Faction.def; StoryHandler.Notify_Interacted(def, TravelMode.Raid, 0); }
public static void Postfix(int tile, Faction faction) { StoryHandler.Notify_Explored(tile); }