Merge branch 'master' into fix-combo-colours

This commit is contained in:
ekrctb 2018-08-16 10:45:54 +09:00 committed by GitHub
commit cf4cb934cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 18 deletions

View File

@ -168,7 +168,6 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
{
StartTime = obj.StartTime,
Samples = obj.Samples,
IsStrong = strong,
Duration = endTimeData.Duration,
RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier)
};

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Rulesets.Taiko.Objects
@ -16,6 +17,8 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// </summary>
public int RequiredHits = 10;
public override bool IsStrong { set => throw new NotSupportedException($"{nameof(Swell)} cannot be a strong hitobject."); }
protected override void CreateNestedHitObjects()
{
base.CreateNestedHitObjects();

View File

@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// Whether this HitObject is a "strong" type.
/// Strong hit objects give more points for hitting the hit object with both keys.
/// </summary>
public bool IsStrong;
public virtual bool IsStrong { get; set; }
protected override void CreateNestedHitObjects()
{

View File

@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using NUnit.Framework;
using OpenTK;
using osu.Framework.Allocation;
@ -116,7 +117,7 @@ namespace osu.Game.Tests.Visual
private void testNullBeatmap()
{
selectNullBeatmap();
selectBeatmap(null);
AddAssert("check empty version", () => string.IsNullOrEmpty(infoWedge.Info.VersionLabel.Text));
AddAssert("check default title", () => infoWedge.Info.TitleLabel.Text == Beatmap.Default.BeatmapInfo.Metadata.Title);
AddAssert("check default artist", () => infoWedge.Info.ArtistLabel.Text == Beatmap.Default.BeatmapInfo.Metadata.Artist);
@ -124,28 +125,19 @@ namespace osu.Game.Tests.Visual
AddAssert("check no info labels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
}
private void selectBeatmap(IBeatmap b)
private void selectBeatmap([CanBeNull] IBeatmap b)
{
BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;
AddStep($"select {b.Metadata.Title} beatmap", () =>
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
{
infoBefore = infoWedge.Info;
infoWedge.Beatmap = Beatmap.Value = new TestWorkingBeatmap(b);
infoWedge.Beatmap = Beatmap.Value = b == null ? Beatmap.Default : new TestWorkingBeatmap(b);
});
AddUntilStep(() => infoWedge.Info != infoBefore, "wait for async load");
}
private void selectNullBeatmap()
{
AddStep("select null beatmap", () =>
{
Beatmap.Value = Beatmap.Default;
infoWedge.Beatmap = Beatmap;
});
}
private IBeatmap createTestBeatmap(RulesetInfo ruleset)
{
List<HitObject> objects = new List<HitObject>();

View File

@ -329,7 +329,7 @@ namespace osu.Game.Beatmaps
return;
}
await Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs")), TaskCreationOptions.LongRunning);
await Task.Factory.StartNew(() => Import(stable.GetDirectories("Songs").Select(f => stable.GetFullPath(f)).ToArray()), TaskCreationOptions.LongRunning);
}
/// <summary>

View File

@ -412,7 +412,7 @@ namespace osu.Game.Database
private ArchiveReader getReaderFrom(string path)
{
if (ZipUtils.IsZipArchive(path))
return new ZipArchiveReader(Files.Storage.GetStream(path), Path.GetFileName(path));
return new ZipArchiveReader(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read), Path.GetFileName(path));
if (Directory.Exists(path))
return new LegacyFilesystemReader(path);
throw new InvalidFormatException($"{path} is not a valid archive");

View File

@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="ppy.osu.Framework" Version="2018.806.0" />
<PackageReference Include="ppy.osu.Framework" Version="2018.815.0" />
<PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />