mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 14:52:57 +08:00
Merge branch 'master' into make-notifications-quieter
This commit is contained in:
commit
40a1f8313e
@ -62,28 +62,30 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
protected override void ParseLine(Beatmap beatmap, Section section, string line)
|
||||||
{
|
{
|
||||||
|
var strippedLine = StripComments(line);
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
handleGeneral(line);
|
handleGeneral(strippedLine);
|
||||||
return;
|
return;
|
||||||
case Section.Editor:
|
case Section.Editor:
|
||||||
handleEditor(line);
|
handleEditor(strippedLine);
|
||||||
return;
|
return;
|
||||||
case Section.Metadata:
|
case Section.Metadata:
|
||||||
handleMetadata(line);
|
handleMetadata(line);
|
||||||
return;
|
return;
|
||||||
case Section.Difficulty:
|
case Section.Difficulty:
|
||||||
handleDifficulty(line);
|
handleDifficulty(strippedLine);
|
||||||
return;
|
return;
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvent(line);
|
handleEvent(strippedLine);
|
||||||
return;
|
return;
|
||||||
case Section.TimingPoints:
|
case Section.TimingPoints:
|
||||||
handleTimingPoint(line);
|
handleTimingPoint(strippedLine);
|
||||||
return;
|
return;
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
handleHitObject(line);
|
handleHitObject(strippedLine);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected virtual void ParseLine(T output, Section section, string line)
|
protected virtual void ParseLine(T output, Section section, string line)
|
||||||
{
|
{
|
||||||
|
line = StripComments(line);
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.Colours:
|
case Section.Colours:
|
||||||
@ -65,6 +67,14 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 bool hasComboColours;
|
||||||
|
|
||||||
private void handleColours(T output, string line)
|
private void handleColours(T output, string line)
|
||||||
|
@ -42,6 +42,8 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected override void ParseLine(Storyboard storyboard, Section section, string line)
|
protected override void ParseLine(Storyboard storyboard, Section section, string line)
|
||||||
{
|
{
|
||||||
|
line = StripComments(line);
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
|
@ -219,9 +219,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (!IsCurrentScreen) return;
|
if (!IsCurrentScreen) return;
|
||||||
|
|
||||||
//we want to hide the hitrenderer immediately (looks better).
|
pauseContainer.Hide();
|
||||||
//we may be able to remove this once the mouse cursor trail is improved.
|
|
||||||
RulesetContainer?.Hide();
|
|
||||||
Restart();
|
Restart();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
protected override void ParseLine(SkinConfiguration skin, Section section, string line)
|
protected override void ParseLine(SkinConfiguration skin, Section section, string line)
|
||||||
{
|
{
|
||||||
|
line = StripComments(line);
|
||||||
|
|
||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
|
Loading…
Reference in New Issue
Block a user