Skip to content

Commit 264738c

Browse files
committed
Removed sorted BPM property.
1 parent c73d646 commit 264738c

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

RhythmGameUtilities/Scripts/Parsers.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public static Dictionary<int, int> ParseBpmFromChartSection(
125125
return section
126126
.Where(item => item.Value[0] == TypeCode.BPM)
127127
.Select(item => new KeyValuePair<int, int>(int.Parse(item.Key), int.Parse(item.Value.Skip(1).First())))
128+
.OrderBy(item => item.Key)
128129
.ToDictionary(item => item.Key, x => x.Value);
129130
}
130131

RhythmGameUtilities/Structs/Song.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ public class Song
9898
[JsonProperty]
9999
public Dictionary<int, int> BPM { get; internal set; }
100100

101-
[JsonIgnore]
102-
public Dictionary<int, int> SortedBPM
103-
{
104-
get
105-
{
106-
if (_sortedBPM.Count != BPM.Count)
107-
{
108-
_sortedBPM = new Dictionary<int, int>(BPM.OrderBy(b => b.Key));
109-
}
110-
111-
return _sortedBPM;
112-
}
113-
}
114-
115101
[JsonProperty]
116102
public Dictionary<int, int[]> TimeSignatures { get; internal set; }
117103

UnityPackage/Scripts/Parsers.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public static Dictionary<int, int> ParseBpmFromChartSection(
125125
return section
126126
.Where(item => item.Value[0] == TypeCode.BPM)
127127
.Select(item => new KeyValuePair<int, int>(int.Parse(item.Key), int.Parse(item.Value.Skip(1).First())))
128+
.OrderBy(item => item.Key)
128129
.ToDictionary(item => item.Key, x => x.Value);
129130
}
130131

UnityPackage/Structs/Song.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@ public class Song
9898
[JsonProperty]
9999
public Dictionary<int, int> BPM { get; internal set; }
100100

101-
[JsonIgnore]
102-
public Dictionary<int, int> SortedBPM
103-
{
104-
get
105-
{
106-
if (_sortedBPM.Count != BPM.Count)
107-
{
108-
_sortedBPM = new Dictionary<int, int>(BPM.OrderBy(b => b.Key));
109-
}
110-
111-
return _sortedBPM;
112-
}
113-
}
114-
115101
[JsonProperty]
116102
public Dictionary<int, int[]> TimeSignatures { get; internal set; }
117103

0 commit comments

Comments
 (0)