Compare commits
164 Commits
2025.831.0
...
2025.913.0
| Author | SHA1 | Date | |
|---|---|---|---|
| d47e26f1ae | |||
| b0e5ae1109 | |||
| 47b859ab17 | |||
| 5e523eb0b1 | |||
|
|
d912f8c3b9 | ||
|
|
83c6e57984 | ||
|
|
1ea17129cc | ||
|
|
1f4f6ce4fe | ||
|
|
231b366e5e | ||
|
|
762fee91ed | ||
|
|
4d76c467f8 | ||
|
|
699892c6a2 | ||
|
|
fa6b830a13 | ||
|
|
278b232318 | ||
|
|
6660406ee9 | ||
|
|
482b7b6d3f | ||
|
|
c8c87089e5 | ||
|
|
b3abd09517 | ||
|
|
014b55602d | ||
|
|
0cd3894fa6 | ||
|
|
a6e42fb0cb | ||
|
|
2bd734918a | ||
|
|
6362fed097 | ||
|
|
16594f2986 | ||
|
|
68e7af0c02 | ||
|
|
caad065433 | ||
|
|
11696a7a3c | ||
|
|
f94d5004ea | ||
|
|
335bc6cdf6 | ||
|
|
eb24e02c38 | ||
|
|
06c1b81c1b | ||
|
|
35885a17b4 | ||
|
|
c2bc67d083 | ||
|
|
645518f5bd | ||
|
|
18b5c652a3 | ||
|
|
3c1c537b1b | ||
|
|
6af48975b0 | ||
|
|
058835440d | ||
|
|
ea79422b60 | ||
|
|
543d21a0ce | ||
|
|
ab7985f31e | ||
|
|
52c10a42be | ||
|
|
912c0a39cf | ||
|
|
45ef97c92c | ||
|
|
54d4b16a01 | ||
|
|
54a0c7af23 | ||
|
|
891b717b3d | ||
|
|
11e1c2d73f | ||
|
|
4475bcafa9 | ||
|
|
32576ff249 | ||
|
|
134f854d7b | ||
|
|
bae288859b | ||
|
|
6e5bf57fe7 | ||
|
|
0027b9846d | ||
|
|
1627f67ada | ||
|
|
ae0f9619b9 | ||
|
|
815bf9c37b | ||
|
|
b0c7b6c700 | ||
|
|
3fcc8d45cb | ||
|
|
f1d06f796a | ||
|
|
be365dfdc5 | ||
|
|
1c608e779d | ||
|
|
b2501ae58f | ||
|
|
23d10ccdeb | ||
|
|
98c3437174 | ||
|
|
a56f81a731 | ||
|
|
dac534e22a | ||
|
|
1ba403753c | ||
|
|
f1a020d2c6 | ||
|
|
15d73ce07e | ||
|
|
0bbad3e1cd | ||
|
|
4ec620c4a9 | ||
|
|
6ce76786ed | ||
|
|
b97cb65444 | ||
|
|
3e8775051e | ||
|
|
0ab3b593e7 | ||
|
|
71d0afd4c2 | ||
|
|
19d194476f | ||
|
|
546113451b | ||
|
|
4a7ee6fafc | ||
|
|
eb1263aa32 | ||
|
|
a840e55977 | ||
|
|
315eea8d9a | ||
|
|
aa847c5833 | ||
|
|
5c66998c57 | ||
|
|
51e7593446 | ||
|
|
6399f7e3db | ||
|
|
1e50e36a64 | ||
|
|
48e4844fbb | ||
|
|
566562240e | ||
|
|
19361666a1 | ||
|
|
dc5794dceb | ||
|
|
f414dd70f5 | ||
|
|
69bcef8339 | ||
|
|
c29217240e | ||
|
|
4a193e96e0 | ||
|
|
79f7f0ecad | ||
|
|
95c7252467 | ||
|
|
a1105ba16f | ||
|
|
bee6c32b83 | ||
|
|
6c82f543e6 | ||
|
|
4ed72efeae | ||
|
|
5c6bbfcc6a | ||
|
|
9354547e15 | ||
|
|
a799720232 | ||
|
|
89aea73495 | ||
|
|
1519084f72 | ||
|
|
677beb4251 | ||
|
|
a8ef57ad0a | ||
|
|
903d91b697 | ||
|
|
b0dcd06b38 | ||
|
|
9422fe52d1 | ||
|
|
f9e89afe03 | ||
|
|
cac136d3c6 | ||
|
|
63ab11ac16 | ||
|
|
a008a66fb2 | ||
|
|
eb392c47e9 | ||
|
|
ffb6ae2066 | ||
|
|
385529ec78 | ||
|
|
cf471066bf | ||
|
|
659480fa3f | ||
|
|
209ba76b21 | ||
|
|
5079a53cca | ||
|
|
060854f23a | ||
|
|
e2d661736e | ||
|
|
82a135af19 | ||
|
|
689cc27e68 | ||
|
|
da7e256302 | ||
|
|
9827f9f189 | ||
|
|
9d0043d03b | ||
|
|
0021434a62 | ||
|
|
677c008b4d | ||
|
|
12430ce464 | ||
|
|
5de7cc3efb | ||
|
|
4e976cff6a | ||
|
|
c7f1210281 | ||
|
|
b02093505d | ||
|
|
08ad27459e | ||
|
|
2fb481e2ee | ||
|
|
d6b4c2958d | ||
|
|
4ffc262073 | ||
|
|
a27fef2437 | ||
|
|
2b52c1de0b | ||
|
|
89492cbd81 | ||
|
|
1bb24c923d | ||
|
|
dfed564bda | ||
|
|
3cf0a9b9c0 | ||
|
|
107e103825 | ||
|
|
3f637db391 | ||
|
|
d4b357dfa0 | ||
|
|
e98579d3af | ||
|
|
a84c364e44 | ||
|
|
2ed79d354c | ||
|
|
d304a31757 | ||
|
|
9ae6e509b7 | ||
|
|
b95573f97d | ||
|
|
03e7e2b0d8 | ||
|
|
20b316d32d | ||
|
|
a6f823e5bc | ||
|
|
1e2468d2bb | ||
|
|
cc7e60daab | ||
|
|
bb588566e6 | ||
|
|
cbab183ea1 | ||
|
|
b1e0cf8532 |
2
.gitignore
vendored
@@ -344,4 +344,4 @@ inspectcode
|
|||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
|
|
||||||
.idea/.idea.osu.Desktop/.idea/misc.xml
|
.idea/.idea.osu.Desktop/.idea/misc.xml
|
||||||
.idea/.idea.osu.Android/.idea/deploymentTargetDropDown.xml
|
.idea/.idea.osu.Android/.idea/deploymentTargetDropDown.xml
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.829.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.908.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Fody does not handle Android build well, and warns when unchanged.
|
<!-- Fody does not handle Android build well, and warns when unchanged.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -1,2 +0,0 @@
|
|||||||
[General]
|
|
||||||
// no version specified means v1
|
|
||||||
@@ -79,6 +79,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
return new ManiaArgonSkinTransformer(skin, beatmap);
|
return new ManiaArgonSkinTransformer(skin, beatmap);
|
||||||
|
|
||||||
case DefaultLegacySkin:
|
case DefaultLegacySkin:
|
||||||
|
case RetroSkin:
|
||||||
return new ManiaClassicSkinTransformer(skin, beatmap);
|
return new ManiaClassicSkinTransformer(skin, beatmap);
|
||||||
|
|
||||||
case LegacySkin:
|
case LegacySkin:
|
||||||
|
|||||||
@@ -42,13 +42,22 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
var bindings = new List<KeyBinding>();
|
var bindings = new List<KeyBinding>();
|
||||||
|
|
||||||
for (int i = LeftKeys.Length - columns / 2; i < LeftKeys.Length; i++)
|
for (int i = LeftKeys.Length - columns / 2; i < LeftKeys.Length; i++)
|
||||||
bindings.Add(new KeyBinding(LeftKeys[i], currentAction++));
|
{
|
||||||
|
bindings.Add(new KeyBinding(LeftKeys[i], currentAction));
|
||||||
|
bindings.Add(new KeyBinding(InputKey.None, currentAction++));
|
||||||
|
}
|
||||||
|
|
||||||
if (columns % 2 == 1)
|
if (columns % 2 == 1)
|
||||||
bindings.Add(new KeyBinding(SpecialKey, currentAction++));
|
{
|
||||||
|
bindings.Add(new KeyBinding(SpecialKey, currentAction));
|
||||||
|
bindings.Add(new KeyBinding(InputKey.None, currentAction++));
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < columns / 2; i++)
|
for (int i = 0; i < columns / 2; i++)
|
||||||
bindings.Add(new KeyBinding(RightKeys[i], currentAction++));
|
{
|
||||||
|
bindings.Add(new KeyBinding(RightKeys[i], currentAction));
|
||||||
|
bindings.Add(new KeyBinding(InputKey.None, currentAction++));
|
||||||
|
}
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -1,6 +0,0 @@
|
|||||||
[General]
|
|
||||||
// no version specified means v1
|
|
||||||
|
|
||||||
[Fonts]
|
|
||||||
HitCircleOverlap: 3
|
|
||||||
ScoreOverlap: 3
|
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB |
@@ -176,6 +176,11 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
private void applyPosition()
|
private void applyPosition()
|
||||||
{
|
{
|
||||||
|
// can happen if popover is dismissed by a keyboard key press while dragging UI controls
|
||||||
|
// it doesn't cause a crash, but it looks wrong
|
||||||
|
if (!editorBeatmap.TransactionActive)
|
||||||
|
return;
|
||||||
|
|
||||||
editorBeatmap.PerformOnSelection(ho =>
|
editorBeatmap.PerformOnSelection(ho =>
|
||||||
{
|
{
|
||||||
if (!initialPositions.TryGetValue(ho, out var initialPosition))
|
if (!initialPositions.TryGetValue(ho, out var initialPosition))
|
||||||
|
|||||||
@@ -157,6 +157,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
rotationInfo.BindValueChanged(rotation =>
|
rotationInfo.BindValueChanged(rotation =>
|
||||||
{
|
{
|
||||||
|
// can happen if the popover is dismissed by a keyboard key press while dragging UI controls
|
||||||
|
if (!rotationHandler.OperationInProgress.Value)
|
||||||
|
return;
|
||||||
|
|
||||||
rotationHandler.Update(rotation.NewValue.Degrees, getOriginPosition(rotation.NewValue));
|
rotationHandler.Update(rotation.NewValue.Degrees, getOriginPosition(rotation.NewValue));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,6 +220,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
scaleInfo.BindValueChanged(scale =>
|
scaleInfo.BindValueChanged(scale =>
|
||||||
{
|
{
|
||||||
|
// can happen if the popover is dismissed by a keyboard key press while dragging UI controls
|
||||||
|
if (!scaleHandler.OperationInProgress.Value)
|
||||||
|
return;
|
||||||
|
|
||||||
var newScale = new Vector2(scale.NewValue.Scale, scale.NewValue.Scale);
|
var newScale = new Vector2(scale.NewValue.Scale, scale.NewValue.Scale);
|
||||||
scaleHandler.Update(newScale, getOriginPosition(scale.NewValue), getAdjustAxis(scale.NewValue), getRotation(scale.NewValue));
|
scaleHandler.Update(newScale, getOriginPosition(scale.NewValue), getAdjustAxis(scale.NewValue), getRotation(scale.NewValue));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,10 +5,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Taiko.Mods;
|
using osu.Game.Rulesets.Taiko.Mods;
|
||||||
using osu.Game.Rulesets.Taiko.Objects;
|
using osu.Game.Rulesets.Taiko.Objects;
|
||||||
|
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||||
{
|
{
|
||||||
@@ -69,5 +72,106 @@ namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestIncreasedVisibilityOnFirstObject()
|
||||||
|
{
|
||||||
|
bool firstHitNeverFadedOut = true;
|
||||||
|
AddStep("enable increased visibility", () => LocalConfig.SetValue(OsuSetting.IncreaseFirstObjectVisibility, true));
|
||||||
|
CreateModTest(new ModTestData
|
||||||
|
{
|
||||||
|
Mod = new TaikoModHidden(),
|
||||||
|
Autoplay = true,
|
||||||
|
PassCondition = () =>
|
||||||
|
{
|
||||||
|
var firstHit = this.ChildrenOfType<DrawableHit>().FirstOrDefault(h => h.HitObject.StartTime == 100);
|
||||||
|
|
||||||
|
if (firstHit?.Alpha < 1 && !firstHit.IsHit)
|
||||||
|
firstHitNeverFadedOut = false;
|
||||||
|
|
||||||
|
return firstHitNeverFadedOut && checkAllMaxResultJudgements(2).Invoke();
|
||||||
|
},
|
||||||
|
CreateBeatmap = () =>
|
||||||
|
{
|
||||||
|
var beatmap = new Beatmap<TaikoHitObject>
|
||||||
|
{
|
||||||
|
HitObjects = new List<TaikoHitObject>
|
||||||
|
{
|
||||||
|
new Hit
|
||||||
|
{
|
||||||
|
Type = HitType.Rim,
|
||||||
|
StartTime = 100,
|
||||||
|
},
|
||||||
|
new Hit
|
||||||
|
{
|
||||||
|
Type = HitType.Centre,
|
||||||
|
StartTime = 200,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
BeatmapInfo =
|
||||||
|
{
|
||||||
|
Difficulty = new BeatmapDifficulty
|
||||||
|
{
|
||||||
|
SliderTickRate = 4,
|
||||||
|
OverallDifficulty = 0,
|
||||||
|
},
|
||||||
|
Ruleset = new TaikoRuleset().RulesetInfo
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
beatmap.ControlPointInfo.Add(0, new EffectControlPoint { ScrollSpeed = 0.1f });
|
||||||
|
return beatmap;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestNoIncreasedVisibilityOnFirstObject()
|
||||||
|
{
|
||||||
|
bool firstHitFadedOut = true;
|
||||||
|
AddStep("enable increased visibility", () => LocalConfig.SetValue(OsuSetting.IncreaseFirstObjectVisibility, false));
|
||||||
|
CreateModTest(new ModTestData
|
||||||
|
{
|
||||||
|
Mod = new TaikoModHidden(),
|
||||||
|
Autoplay = true,
|
||||||
|
PassCondition = () =>
|
||||||
|
{
|
||||||
|
var firstHit = this.ChildrenOfType<DrawableHit>().FirstOrDefault(h => h.HitObject.StartTime == 100);
|
||||||
|
firstHitFadedOut |= firstHit?.IsHit == false && firstHit.Alpha < 1;
|
||||||
|
return firstHitFadedOut && checkAllMaxResultJudgements(2).Invoke();
|
||||||
|
},
|
||||||
|
CreateBeatmap = () =>
|
||||||
|
{
|
||||||
|
var beatmap = new Beatmap<TaikoHitObject>
|
||||||
|
{
|
||||||
|
HitObjects = new List<TaikoHitObject>
|
||||||
|
{
|
||||||
|
new Hit
|
||||||
|
{
|
||||||
|
Type = HitType.Rim,
|
||||||
|
StartTime = 100,
|
||||||
|
},
|
||||||
|
new Hit
|
||||||
|
{
|
||||||
|
Type = HitType.Centre,
|
||||||
|
StartTime = 200,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
BeatmapInfo =
|
||||||
|
{
|
||||||
|
Difficulty = new BeatmapDifficulty
|
||||||
|
{
|
||||||
|
SliderTickRate = 4,
|
||||||
|
OverallDifficulty = 0,
|
||||||
|
},
|
||||||
|
Ruleset = new TaikoRuleset().RulesetInfo
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
beatmap.ControlPointInfo.Add(0, new EffectControlPoint { ScrollSpeed = 0.1f });
|
||||||
|
return beatmap;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,5 +0,0 @@
|
|||||||
[General]
|
|
||||||
Name: an old skin
|
|
||||||
Author: an old guy
|
|
||||||
|
|
||||||
// no version specified means v1
|
|
||||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
@@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
|||||||
|
|
||||||
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||||
{
|
{
|
||||||
ApplyNormalVisibilityState(hitObject, state);
|
// intentional no-op
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||||
|
|||||||
@@ -1018,6 +1018,49 @@ namespace osu.Game.Tests.Database
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestBeatmapFilesInNestedDirectoriesAreIgnored()
|
||||||
|
{
|
||||||
|
RunTestWithRealmAsync(async (realm, storage) =>
|
||||||
|
{
|
||||||
|
var importer = new BeatmapImporter(storage, realm);
|
||||||
|
using var store = new RealmRulesetStore(realm, storage);
|
||||||
|
|
||||||
|
string? temp = TestResources.GetTestBeatmapForImport();
|
||||||
|
|
||||||
|
string extractedFolder = $"{temp}_extracted";
|
||||||
|
Directory.CreateDirectory(extractedFolder);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (var zip = ZipArchive.Open(temp))
|
||||||
|
zip.WriteToDirectory(extractedFolder);
|
||||||
|
|
||||||
|
var subdirectory = Directory.CreateDirectory(Path.Combine(extractedFolder, "subdir"));
|
||||||
|
string modifiedCopyPath = Path.Combine(subdirectory.FullName, "duplicate.osu");
|
||||||
|
File.Copy(Directory.GetFiles(extractedFolder, "*.osu").First(), modifiedCopyPath);
|
||||||
|
|
||||||
|
using (var stream = File.OpenWrite(modifiedCopyPath))
|
||||||
|
using (var textWriter = new StreamWriter(stream))
|
||||||
|
await textWriter.WriteLineAsync("# adding a comment so that the hashes are different");
|
||||||
|
|
||||||
|
using (var zip = ZipArchive.Create())
|
||||||
|
{
|
||||||
|
zip.AddAllFromDirectory(extractedFolder);
|
||||||
|
zip.SaveTo(temp, new ZipWriterOptions(CompressionType.Deflate));
|
||||||
|
}
|
||||||
|
|
||||||
|
await importer.Import(temp);
|
||||||
|
|
||||||
|
EnsureLoaded(realm.Realm);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Directory.Delete(extractedFolder, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestImportNestedStructure()
|
public void TestImportNestedStructure()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -178,6 +178,16 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
|||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestApplyBPMQueries()
|
public void TestApplyBPMQueries()
|
||||||
|
{
|
||||||
|
const string query = "bpm=200";
|
||||||
|
var filterCriteria = new FilterCriteria();
|
||||||
|
FilterQueryParser.ApplyQueries(filterCriteria, query);
|
||||||
|
Assert.AreEqual(filterCriteria.BPM.Min, 199.5d);
|
||||||
|
Assert.AreEqual(filterCriteria.BPM.Max, 200.5d);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestApplyBPMRangeQueries()
|
||||||
{
|
{
|
||||||
const string query = "bpm>:200 gotta go fast";
|
const string query = "bpm>:200 gotta go fast";
|
||||||
var filterCriteria = new FilterCriteria();
|
var filterCriteria = new FilterCriteria();
|
||||||
@@ -185,8 +195,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
|||||||
Assert.AreEqual("gotta go fast", filterCriteria.SearchText.Trim());
|
Assert.AreEqual("gotta go fast", filterCriteria.SearchText.Trim());
|
||||||
Assert.AreEqual(3, filterCriteria.SearchTerms.Length);
|
Assert.AreEqual(3, filterCriteria.SearchTerms.Length);
|
||||||
Assert.IsNotNull(filterCriteria.BPM.Min);
|
Assert.IsNotNull(filterCriteria.BPM.Min);
|
||||||
Assert.Greater(filterCriteria.BPM.Min, 199.99d);
|
Assert.AreEqual(filterCriteria.BPM.Min, 199.5d);
|
||||||
Assert.Less(filterCriteria.BPM.Min, 200.00d);
|
|
||||||
Assert.IsNull(filterCriteria.BPM.Max);
|
Assert.IsNull(filterCriteria.BPM.Max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||