コード例 #1
0
        private static string SeasonsContinuousRangeLabel(List <Twelfth> twelfths, Twelfth rootTwelfth, Vector2 longLat)
        {
            Twelfth leftMostTwelfth  = TwelfthUtility.GetLeftMostTwelfth(twelfths, rootTwelfth);
            Twelfth rightMostTwelfth = TwelfthUtility.GetRightMostTwelfth(twelfths, rootTwelfth);

            for (Twelfth twelfth = leftMostTwelfth; twelfth != rightMostTwelfth; twelfth = TwelfthUtility.TwelfthAfter(twelfth))
            {
                if (!twelfths.Contains(twelfth))
                {
                    Log.Error(string.Concat(new object[]
                    {
                        "Twelfths doesn't contain ",
                        twelfth,
                        " (",
                        leftMostTwelfth,
                        "..",
                        rightMostTwelfth,
                        ")"
                    }), false);
                    break;
                }
                twelfths.Remove(twelfth);
            }
            twelfths.Remove(rightMostTwelfth);
            return(GenDate.SeasonDateStringAt(leftMostTwelfth, longLat) + " - " + GenDate.SeasonDateStringAt(rightMostTwelfth, longLat));
        }
コード例 #2
0
        private static string SeasonsContinuousRangeLabel(List <Twelfth> twelfths, Twelfth rootTwelfth, Vector2 longLat)
        {
            Twelfth leftMostTwelfth  = TwelfthUtility.GetLeftMostTwelfth(twelfths, rootTwelfth);
            Twelfth rightMostTwelfth = TwelfthUtility.GetRightMostTwelfth(twelfths, rootTwelfth);
            Twelfth twelfth          = leftMostTwelfth;

            while (twelfth != rightMostTwelfth)
            {
                if (twelfths.Contains(twelfth))
                {
                    twelfths.Remove(twelfth);
                    twelfth = TwelfthUtility.TwelfthAfter(twelfth);
                    continue;
                }
                Log.Error("Twelfths doesn't contain " + twelfth + " (" + leftMostTwelfth + ".." + rightMostTwelfth + ")");
                break;
            }
            twelfths.Remove(rightMostTwelfth);
            return(GenDate.SeasonDateStringAt(leftMostTwelfth, longLat) + " - " + GenDate.SeasonDateStringAt(rightMostTwelfth, longLat));
        }
コード例 #3
0
ファイル: GenDate.cs プロジェクト: ehtnnd/RW-Decompile
 public static string SeasonDateStringAt(Twelfth twelfth, Vector2 longLat)
 {
     return(GenDate.SeasonDateStringAt((long)((int)twelfth * 300000 + 1), longLat));
 }