예제 #1
0
        public void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            WorldName world;

            row.TryGetEnum <WorldName>("World", out world, WorldName.Undefined);

            List <DaysOfTheWeek> days = ParserFunctions.ParseDayList(row.GetString("Days"));

            if ((days == null) || (days.Count == 0))
            {
                days = ParserFunctions.ParseDayList("MTWRFSU");
            }

            int startHour = row.GetInt("StartHour");
            int endHour   = row.GetInt("EndHour");

            if (startHour > endHour)
            {
                return;
            }

            int speed = row.GetInt("Speed");

            if (speed <= 0)
            {
                speed = Relativity.sOneMinute;
            }

            mIntervals.Add(new SpeedInterval(world, days, startHour, endHour, speed));
        }
예제 #2
0
 public void Import(Persistence.Lookup settings)
 {
     mWorld     = settings.GetEnum <WorldName>("World", GameUtils.GetCurrentWorld());
     mDays      = ParserFunctions.ParseDayList(settings.GetString("Days"));
     mStartHour = settings.GetInt("StartHour", 0);
     mEndHour   = settings.GetInt("EndHour", 24);
     mSpeed     = settings.GetInt("Speed", Relativity.sOneMinute);
 }