Merge branch 'master' into make-notifications-quieter

This commit is contained in:
Dean Herbert 2018-07-17 03:24:47 +09:00 committed by GitHub
commit 40a1f8313e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 9 deletions

View File

@ -62,28 +62,30 @@ protected override void ParseStreamInto(StreamReader stream, Beatmap beatmap)
protected override void ParseLine(Beatmap beatmap, Section section, string line)
{
var strippedLine = StripComments(line);
switch (section)
{
case Section.General:
handleGeneral(line);
handleGeneral(strippedLine);
return;
case Section.Editor:
handleEditor(line);
handleEditor(strippedLine);
return;
case Section.Metadata:
handleMetadata(line);
return;
case Section.Difficulty:
handleDifficulty(line);
handleDifficulty(strippedLine);
return;
case Section.Events:
handleEvent(line);
handleEvent(strippedLine);
return;
case Section.TimingPoints:
handleTimingPoint(line);
handleTimingPoint(strippedLine);
return;
case Section.HitObjects:
handleHitObject(line);
handleHitObject(strippedLine);
return;
}

View File

@ -57,6 +57,8 @@ protected override void ParseStreamInto(StreamReader stream, T output)
protected virtual void ParseLine(T output, Section section, string line)
{
line = StripComments(line);
switch (section)
{
case Section.Colours:
@ -65,6 +67,14 @@ protected virtual void ParseLine(T output, Section section, string line)
}
}
protected string StripComments(string line)
{
var index = line.IndexOf("//", StringComparison.Ordinal);
if (index > 0)
return line.Substring(0, index);
return line;
}
private bool hasComboColours;
private void handleColours(T output, string line)

View File

@ -42,6 +42,8 @@ protected override void ParseStreamInto(StreamReader stream, Storyboard storyboa
protected override void ParseLine(Storyboard storyboard, Section section, string line)
{
line = StripComments(line);
switch (section)
{
case Section.Events:

View File

@ -219,9 +219,7 @@ private void load(AudioManager audio, APIAccess api, OsuConfigManager config)
{
if (!IsCurrentScreen) return;
//we want to hide the hitrenderer immediately (looks better).
//we may be able to remove this once the mouse cursor trail is improved.
RulesetContainer?.Hide();
pauseContainer.Hide();
Restart();
},
}

View File

@ -14,6 +14,8 @@ public LegacySkinDecoder()
protected override void ParseLine(SkinConfiguration skin, Section section, string line)
{
line = StripComments(line);
switch (section)
{
case Section.General: