Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Incognito" mod for osu! ruleset #22271

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for incognito mod
  • Loading branch information
o-dasher committed Jan 18, 2023
commit f97dd03dfeaf3726a616aff20369ab1e8934e8d0
35 changes: 35 additions & 0 deletions osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModIncognito.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Linq;
using NUnit.Framework;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Osu.UI;
using osuTK.Graphics;

namespace osu.Game.Rulesets.Osu.Tests.Mods
{
public partial class TestSceneOsuModIncognito : OsuModTestScene
{
[Test]
public void TestDisableFollowPoints() => CreateModTest(new ModTestData
{
Mod = new OsuModIncognito { DisableFollowPoints = { Value = true } },
PassCondition = () => !((DrawableOsuRuleset)Player.DrawableRuleset).Playfield.FollowPoints.IsPresent
});

[Test]
public void TestNoComboColors()
{
CreateModTest(new ModTestData
{
Mod = new OsuModIncognito { NoComboColours = { Value = true } },
PassCondition = () => true
});

AddStep("Skip to first", () => Player.GameplayClockContainer.Seek(Beatmap.Value.Beatmap.HitObjects.First().StartTime));

AddAssert("Combo colours are obscured", () => Player.DrawableRuleset.Playfield.HitObjectContainer.AliveObjects.All(o => o.AccentColour.Value == Color4.White));
}
}
}