mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
AppVeyor
This commit is contained in:
parent
dcc4e863ab
commit
0158246ba1
@ -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(',');
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user