1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00
This commit is contained in:
james58899 2018-01-04 19:23:00 +08:00
parent dcc4e863ab
commit 0158246ba1
No known key found for this signature in database
GPG Key ID: 7F83E3A11DD5192E
3 changed files with 13 additions and 13 deletions

View File

@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleGeneral(string line)
{
var pair = splitKeyVal(line, ':');
var pair = SplitKeyVal(line, ':');
var metadata = beatmap.BeatmapInfo.Metadata;
switch (pair.Key)
@ -145,7 +145,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleEditor(string line)
{
var pair = splitKeyVal(line, ':');
var pair = SplitKeyVal(line, ':');
switch (pair.Key)
{
@ -169,7 +169,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleMetadata(string line)
{
var pair = splitKeyVal(line, ':');
var pair = SplitKeyVal(line, ':');
var metadata = beatmap.BeatmapInfo.Metadata;
switch (pair.Key)
@ -210,7 +210,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleDifficulty(string line)
{
var pair = splitKeyVal(line, ':');
var pair = SplitKeyVal(line, ':');
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
switch (pair.Key)
@ -353,7 +353,7 @@ namespace osu.Game.Beatmaps.Formats
private void handleColours(string line)
{
var pair = splitKeyVal(line, ':');
var pair = SplitKeyVal(line, ':');
string[] split = pair.Value.Split(',');

View File

@ -81,7 +81,7 @@ namespace osu.Game.Beatmaps.Formats
protected abstract void ProcessSection(Section section, string line);
protected KeyValuePair<string, string> splitKeyVal(string line, char separator)
protected KeyValuePair<string, string> SplitKeyVal(string line, char separator)
{
var split = line.Trim().Split(new[] { separator }, 2);

View File

@ -20,7 +20,7 @@ namespace osu.Game.Beatmaps.Formats
private StoryboardSprite storyboardSprite;
private CommandTimelineGroup timelineGroup;
private readonly Dictionary<string, string> Variables = new Dictionary<string, string>();
private readonly Dictionary<string, string> variables = new Dictionary<string, string>();
public LegacyStoryboardDecoder()
{
@ -65,7 +65,7 @@ namespace osu.Game.Beatmaps.Formats
line = line.Substring(1);
}
DecodeVariables(ref line);
decodeVariables(ref line);
string[] split = line.Split(',');
@ -274,15 +274,15 @@ namespace osu.Game.Beatmaps.Formats
private void handleVariables(string line)
{
var pair = splitKeyVal(line, '=');
Variables[pair.Key] = pair.Value;
var pair = SplitKeyVal(line, '=');
variables[pair.Key] = pair.Value;
}
/// <summary>
/// Decodes any beatmap variables present in a line into their real values.
/// </summary>
/// <param name="line">The line which may contains variables.</param>
private void DecodeVariables(ref string line)
private void decodeVariables(ref string line)
{
while (line.IndexOf('$') >= 0)
{
@ -291,8 +291,8 @@ namespace osu.Game.Beatmaps.Formats
for (int i = 0; i < split.Length; i++)
{
var item = split[i];
if (item.StartsWith("$") && Variables.ContainsKey(item))
split[i] = Variables[item];
if (item.StartsWith("$") && variables.ContainsKey(item))
split[i] = variables[item];
}
line = string.Join(",", split);