mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Merge branch 'master' into more-import-logging
This commit is contained in:
commit
985528d08b
@ -408,12 +408,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
parser = new Rulesets.Objects.Legacy.Osu.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
parser = new Rulesets.Objects.Legacy.Osu.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
||||||
|
|
||||||
var obj = parser.Parse(line);
|
var obj = parser.Parse(line);
|
||||||
|
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
|
||||||
beatmap.HitObjects.Add(obj);
|
beatmap.HitObjects.Add(obj);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private int getOffsetTime(int time) => time + (ApplyOffsets ? offset : 0);
|
private int getOffsetTime(int time) => time + (ApplyOffsets ? offset : 0);
|
||||||
|
|
||||||
|
@ -269,9 +269,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
return Anchor.BottomCentre;
|
return Anchor.BottomCentre;
|
||||||
case LegacyOrigins.BottomRight:
|
case LegacyOrigins.BottomRight:
|
||||||
return Anchor.BottomRight;
|
return Anchor.BottomRight;
|
||||||
|
default:
|
||||||
|
return Anchor.TopLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidDataException($@"Unknown origin: {value}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleVariables(string line)
|
private void handleVariables(string line)
|
||||||
|
@ -10,6 +10,8 @@ using System.IO;
|
|||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Objects.Legacy
|
namespace osu.Game.Rulesets.Objects.Legacy
|
||||||
@ -37,6 +39,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
FormatVersion = formatVersion;
|
FormatVersion = formatVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public override HitObject Parse(string text)
|
public override HitObject Parse(string text)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -191,7 +194,10 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result == null)
|
if (result == null)
|
||||||
throw new InvalidOperationException($@"Unknown hit object type {type}.");
|
{
|
||||||
|
Logger.Log($"Unknown hit object type: {type}. Skipped.", level: LogLevel.Error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture) + Offset;
|
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture) + Offset;
|
||||||
result.Samples = convertSoundType(soundType, bankInfo);
|
result.Samples = convertSoundType(soundType, bankInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user