public void Notify_Interacted(FactionDef def, TravelMode mode, int profit) { IEnumerable <Objective> objectives = GetObjectives.Where(o => o.CurrentState == MOState.Active && o.def.type == ObjectiveType.Travel); foreach (Objective objective in objectives) { objective.travelTracker.Notify_Interacted(def, mode, profit); } }
public void Notify_Explored(int tile) { IEnumerable <Objective> objectives = GetObjectives.Where(o => o.CurrentState == MOState.Active && o.def.type == ObjectiveType.Travel); foreach (Objective objective in objectives) { objective.travelTracker.TryExplore(tile); } }
public void Notify_IncidentFired(IncidentDef def) { UpdateMissionList(null, def); IEnumerable <Objective> objectives = GetObjectives.Where(o => o.CurrentState == MOState.Inactive && (o.def.requisites?.incidents.Contains(def) ?? false)); foreach (Objective objective in objectives) { if (objective.parentMission.def.chronological) { return; } if (objective.def.requisites?.IsFulfilled(null, def) ?? true) { objective.Notify_Start(); } } }
public void Notify_JobStarted(JobDef def, Pawn worker = null) { UpdateMissionList(def); IEnumerable <Objective> objectives = GetObjectives.Where(o => o.CurrentState == MOState.Inactive && (o.def.requisites?.jobs.Contains(def) ?? false)); foreach (Objective objective in objectives) { if (objective.parentMission.def.chronological) { return; } if (objective.def.requisites?.IsFulfilled(def) ?? true) { objective.Notify_Start(); objective.lastTarget = worker; } } }