コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 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);
         }
     }
 }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
        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);
                }
            }
        }