public void ChangeStateIfInProgress(List <string> keys, MissionState.StateTypes state, DateTime missingtime) { foreach (string k in keys) { if (Missions.ContainsKey(k) && Missions[k].State == MissionState.StateTypes.InProgress) { Missions[k] = new MissionState(Missions[k], state, missingtime); } } }
public void ChangeStateIfInProgress(List <string> keys, MissionState.StateTypes state, DateTime missingtime) { history.NextGeneration(); foreach (string key in keys) { MissionState m = history.GetLast(key); // we must have a last entry to resurrect if (m != null && m.State == MissionState.StateTypes.InProgress) { history[key] = new MissionState(m, state, missingtime); } } }
public void Disappeared(List <string> keys, DateTime missingtime) { foreach (string k in keys) { if (Missions.ContainsKey(k) && Missions[k].State == MissionState.StateTypes.InProgress) { // permits seem to be only 1 journal entry.. so its completed. MissionState.StateTypes st = Missions[k].Mission.Name.Contains("permit", StringComparison.InvariantCultureIgnoreCase) ? MissionState.StateTypes.Completed : MissionState.StateTypes.Abandoned; Missions[k] = new MissionState(Missions[k], st, missingtime); } } }
public void Disappeared(List <string> keys, DateTime missingtime) { history.NextGeneration(); foreach (string key in keys) { MissionState m = history.GetLast(key); // we must have a last entry to resurrect if (m != null && m.State == MissionState.StateTypes.InProgress) { // permits seem to be only 1 journal entry.. so its completed. MissionState.StateTypes st = m.Mission.Name.Contains("permit", StringComparison.InvariantCultureIgnoreCase) ? MissionState.StateTypes.Completed : MissionState.StateTypes.Abandoned; history[key] = new MissionState(m, st, missingtime); } } }