Compare commits
9 Commits
2025.1108.
...
b7e36164c3
| Author | SHA1 | Date | |
|---|---|---|---|
| b7e36164c3 | |||
| 0f5f13858d | |||
| 89a0c75156 | |||
| ab7e5c94f1 | |||
| 8dc9ea4553 | |||
| dcf553c252 | |||
| 43f3a506ea | |||
| ab51579c27 | |||
| d8e977c05f |
12
.github/ISSUE_TEMPLATE/config.yml
vendored
12
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,12 +1,6 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Help
|
- name: Help
|
||||||
url: https://github.com/ppy/osu/discussions/categories/q-a
|
url: https://t.me/jvnkosu_chat
|
||||||
about: osu! not working or performing as you'd expect? Not sure it's a bug? Check the Q&A section!
|
about: Your jvnkosu! is not working right? Please contact us using our Telegram chat
|
||||||
- name: Suggestions or feature request
|
|
||||||
url: https://github.com/ppy/osu/discussions/categories/ideas
|
|
||||||
about: Got something you think should change or be added? Search for or start a new discussion!
|
|
||||||
- name: osu!stable issues
|
|
||||||
url: https://github.com/ppy/osu-stable-issues
|
|
||||||
about: For osu!(stable) - ie. the current "live" game version, check out the dedicated repository. Note that this is for serious bug reports only, not tech support.
|
|
||||||
|
|
||||||
|
|||||||
@@ -115,12 +115,10 @@ namespace osu.Desktop
|
|||||||
if (IsFirstRun)
|
if (IsFirstRun)
|
||||||
LocalConfig.SetValue(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
LocalConfig.SetValue(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||||
|
|
||||||
// if (IsPackageManaged)
|
if (IsPackageManaged)
|
||||||
// return new NoActionUpdateManager();
|
return new NoActionUpdateManager();
|
||||||
|
|
||||||
// return new VelopackUpdateManager();
|
return new VelopackUpdateManager(); // yay
|
||||||
|
|
||||||
return new NoActionUpdateManager(); // for now, APIs are useless for actually downloading the releases. TODO: adapt UpdateManager for gitea
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool RestartAppWhenExited()
|
public override bool RestartAppWhenExited()
|
||||||
|
|||||||
@@ -208,9 +208,10 @@ namespace osu.Desktop
|
|||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
private static void configureWindows(VelopackApp app)
|
private static void configureWindows(VelopackApp app)
|
||||||
{
|
{
|
||||||
app.OnFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
// we do not want associations here, as that breaks official lazer's associations
|
||||||
app.OnAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
// app.OnFirstRun(_ => WindowsAssociationManager.InstallAssociations());
|
||||||
app.OnBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
// app.OnAfterUpdateFastCallback(_ => WindowsAssociationManager.UpdateAssociations());
|
||||||
|
// app.OnBeforeUninstallFastCallback(_ => WindowsAssociationManager.UninstallAssociations());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace osu.Desktop.Updater
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IUpdateSource updateSource = new GithubSource(@"https://github.com/ppy/osu", null, ReleaseStream.Value == Game.Configuration.ReleaseStream.Tachyon);
|
IUpdateSource updateSource = new GiteaSource(@"https://gitea.jvnko.boats/jvnkosu/client", null, ReleaseStream.Value == Game.Configuration.ReleaseStream.Tachyon);
|
||||||
Velopack.UpdateManager updateManager = new Velopack.UpdateManager(updateSource, new UpdateOptions
|
Velopack.UpdateManager updateManager = new Velopack.UpdateManager(updateSource, new UpdateOptions
|
||||||
{
|
{
|
||||||
AllowVersionDowngrade = true
|
AllowVersionDowngrade = true
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 401 KiB |
@@ -14,8 +14,8 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => Name;
|
public override string Acronym => Name;
|
||||||
public abstract int KeyCount { get; }
|
public abstract int KeyCount { get; }
|
||||||
public override ModType Type => ModType.Conversion;
|
public override ModType Type => ModType.Conversion;
|
||||||
public override double ScoreMultiplier => 0.9;
|
public override double ScoreMultiplier => 1;
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
|
public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
typeof(ManiaModFadeIn)
|
typeof(ManiaModFadeIn)
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
|
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public override bool ValidForFreestyleAsRequiredMod => false;
|
public override bool ValidForFreestyleAsRequiredMod => false;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public class ManiaModHardRock : ModHardRock, IApplicableToHitObject
|
public class ManiaModHardRock : ModHardRock, IApplicableToHitObject
|
||||||
{
|
{
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override bool Ranked => false;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public const double HIT_WINDOW_DIFFICULTY_MULTIPLIER = 1.4;
|
public const double HIT_WINDOW_DIFFICULTY_MULTIPLIER = 1.4;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => "1K";
|
public override string Acronym => "1K";
|
||||||
public override IconUsage? Icon => OsuIcon.ModOneKey;
|
public override IconUsage? Icon => OsuIcon.ModOneKey;
|
||||||
public override LocalisableString Description => @"Play with one key.";
|
public override LocalisableString Description => @"Play with one key.";
|
||||||
public override bool Ranked => false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => "10K";
|
public override string Acronym => "10K";
|
||||||
public override IconUsage? Icon => OsuIcon.ModTenKeys;
|
public override IconUsage? Icon => OsuIcon.ModTenKeys;
|
||||||
public override LocalisableString Description => @"Play with ten keys.";
|
public override LocalisableString Description => @"Play with ten keys.";
|
||||||
public override bool Ranked => false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => "2K";
|
public override string Acronym => "2K";
|
||||||
public override IconUsage? Icon => OsuIcon.ModTwoKeys;
|
public override IconUsage? Icon => OsuIcon.ModTwoKeys;
|
||||||
public override LocalisableString Description => @"Play with two keys.";
|
public override LocalisableString Description => @"Play with two keys.";
|
||||||
public override bool Ranked => false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public override string Acronym => "3K";
|
public override string Acronym => "3K";
|
||||||
public override IconUsage? Icon => OsuIcon.ModThreeKeys;
|
public override IconUsage? Icon => OsuIcon.ModThreeKeys;
|
||||||
public override LocalisableString Description => @"Play with three keys.";
|
public override LocalisableString Description => @"Play with three keys.";
|
||||||
public override bool Ranked => false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
public class ManiaModMirror : ModMirror, IApplicableToBeatmap
|
public class ManiaModMirror : ModMirror, IApplicableToBeatmap
|
||||||
{
|
{
|
||||||
public override LocalisableString Description => "Notes are flipped horizontally.";
|
public override LocalisableString Description => "Notes are flipped horizontally.";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public void ApplyToBeatmap(IBeatmap beatmap)
|
public void ApplyToBeatmap(IBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
|||||||
16
osu.Game.Rulesets.Osu/Mods/OsuModRateAdjustConcrete.cs
Normal file
16
osu.Game.Rulesets.Osu/Mods/OsuModRateAdjustConcrete.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Overlays.Settings;
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
|
{
|
||||||
|
public class OsuModRateAdjustConcrete : ModRateAdjustConcrete
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override LocalisableString Description => @"Spinners will be automatically completed.";
|
public override LocalisableString Description => @"Spinners will be automatically completed.";
|
||||||
public override double ScoreMultiplier => 0.9;
|
public override double ScoreMultiplier => 0.9;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot), typeof(OsuModTargetPractice) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModAutoplay), typeof(OsuModAutopilot), typeof(OsuModTargetPractice) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public void ApplyToDrawableHitObject(DrawableHitObject hitObject)
|
public void ApplyToDrawableHitObject(DrawableHitObject hitObject)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public class OsuModTouchDevice : ModTouchDevice
|
public class OsuModTouchDevice : ModTouchDevice
|
||||||
{
|
{
|
||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModBloom) }).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(OsuModAutopilot), typeof(OsuModBloom) }).ToArray();
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,6 +230,12 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new ModScoreV2(),
|
new ModScoreV2(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
case ModType.Special:
|
||||||
|
return new Mod[]
|
||||||
|
{
|
||||||
|
new OsuModRateAdjustConcrete(),
|
||||||
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Array.Empty<Mod>();
|
return Array.Empty<Mod>();
|
||||||
}
|
}
|
||||||
|
|||||||
29
osu.Game.Tests/Visual/Menus/TestSceneDisclaimer.cs
Normal file
29
osu.Game.Tests/Visual/Menus/TestSceneDisclaimer.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Menus
|
||||||
|
{
|
||||||
|
public partial class TestSceneDisclaimer : ScreenTestScene
|
||||||
|
{
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
AddStep("load disclaimer", () => LoadScreen(new Disclaimer()));
|
||||||
|
|
||||||
|
AddStep("toggle support", () =>
|
||||||
|
{
|
||||||
|
((DummyAPIAccess)API).LocalUser.Value = new APIUser
|
||||||
|
{
|
||||||
|
Username = API.LocalUser.Value.Username,
|
||||||
|
Id = API.LocalUser.Value.Id + 1,
|
||||||
|
IsSupporter = !API.LocalUser.Value.IsSupporter,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.Ruleset, string.Empty);
|
SetDefault(OsuSetting.Ruleset, string.Empty);
|
||||||
SetDefault(OsuSetting.Skin, SkinInfo.ARGON_SKIN.ToString());
|
SetDefault(OsuSetting.Skin, SkinInfo.ARGON_SKIN.ToString());
|
||||||
|
|
||||||
SetDefault(OsuSetting.MenuCookieColor, Colour4.FromHex(@"ff66ba"));
|
SetDefault(OsuSetting.MenuCookieColor, Colour4.FromHex(@"8400FF"));
|
||||||
|
|
||||||
SetDefault(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Local);
|
SetDefault(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Local);
|
||||||
SetDefault(OsuSetting.BeatmapLeaderboardSortMode, LeaderboardSortMode.Score);
|
SetDefault(OsuSetting.BeatmapLeaderboardSortMode, LeaderboardSortMode.Score);
|
||||||
|
|||||||
@@ -183,6 +183,9 @@ namespace osu.Game.Graphics
|
|||||||
case ModType.System:
|
case ModType.System:
|
||||||
return Yellow;
|
return Yellow;
|
||||||
|
|
||||||
|
case ModType.Special:
|
||||||
|
return Orange2;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type");
|
throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
Spacing = new Vector2(-3, 0),
|
Spacing = new Vector2(-3, 0),
|
||||||
Padding = new MarginPadding { Top = -5 },
|
Padding = new MarginPadding { Top = -5 },
|
||||||
Colour = GetRankLetterColour(rank),
|
Colour = GetRankLetterColour(rank),
|
||||||
Font = OsuFont.TorusAlternate.With(size: 42, weight: FontWeight.SemiBold),
|
Font = OsuFont.TorusAlternate.With(size: 40, weight: FontWeight.Bold),
|
||||||
Text = GetRankLetter(rank),
|
Text = GetRankLetter(rank),
|
||||||
ShadowColour = Color4.Black.Opacity(0.3f),
|
ShadowColour = Color4.Black.Opacity(0.3f),
|
||||||
ShadowOffset = new Vector2(0, 0.08f),
|
ShadowOffset = new Vector2(0, 0.08f),
|
||||||
@@ -72,12 +72,14 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
switch (rank)
|
switch (rank)
|
||||||
{
|
{
|
||||||
case ScoreRank.SH:
|
case ScoreRank.SH:
|
||||||
return @"S";
|
return @"S+";
|
||||||
|
|
||||||
case ScoreRank.X:
|
case ScoreRank.X:
|
||||||
case ScoreRank.XH:
|
|
||||||
return @"SS";
|
return @"SS";
|
||||||
|
|
||||||
|
case ScoreRank.XH:
|
||||||
|
return @"SS+";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return rank.ToString();
|
return rank.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -932,7 +932,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected virtual Loader CreateLoader() => new Loader();
|
protected virtual Loader CreateLoader() => new Loader();
|
||||||
|
|
||||||
protected virtual UpdateManager CreateUpdateManager() => new NoActionUpdateManager();
|
protected virtual UpdateManager CreateUpdateManager() => new UpdateManager();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adjust the globally applied <see cref="DrawSizePreservingFillContainer.TargetDrawSize"/> in every <see cref="ScalingContainer"/>.
|
/// Adjust the globally applied <see cref="DrawSizePreservingFillContainer.TargetDrawSize"/> in every <see cref="ScalingContainer"/>.
|
||||||
@@ -1729,12 +1729,13 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
case IntroScreen intro:
|
case IntroScreen intro:
|
||||||
introScreen = intro;
|
introScreen = intro;
|
||||||
SimpleNotification notification = new SimpleNotification
|
// SimpleNotification notification = new SimpleNotification
|
||||||
{
|
// {
|
||||||
Text = ButtonSystemStrings.GreetingNotification,
|
// Text = ButtonSystemStrings.GreetingNotification,
|
||||||
Transient = true,
|
// Transient = true,
|
||||||
};
|
// PopInSampleName = "",
|
||||||
Notifications?.Post(notification);
|
// };
|
||||||
|
// Notifications?.Post(notification);
|
||||||
devBuildBanner?.Show();
|
devBuildBanner?.Show();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Development;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
@@ -9,6 +10,7 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
@@ -26,30 +28,42 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
AutoSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.BottomCentre,
|
Direction = FillDirection.Vertical,
|
||||||
Font = OsuFont.Torus.With(size: 12),
|
Children = new Drawable[]
|
||||||
Colour = colours.GrayF,
|
{
|
||||||
Text = $@"jvnkosu! " + game.Version,
|
new FillFlowContainer
|
||||||
Y = -12,
|
{
|
||||||
},
|
AutoSizeAxes = Axes.Both,
|
||||||
new OsuSpriteText
|
Direction = FillDirection.Horizontal,
|
||||||
{
|
Spacing = new Vector2(5),
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 15),
|
Children = new Drawable[]
|
||||||
Colour = colours.Yellow,
|
{
|
||||||
Text = "Experimental version",
|
new OsuSpriteText
|
||||||
},
|
{
|
||||||
new Sprite
|
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||||
{
|
Text = game.Name
|
||||||
Anchor = Anchor.BottomCentre,
|
},
|
||||||
Origin = Anchor.BottomCentre,
|
new OsuSpriteText
|
||||||
Texture = textures.Get(@"Menu/dev-build-footer"),
|
{
|
||||||
Scale = new Vector2(0.4f, 1),
|
Colour = DebugUtils.IsDebugBuild ? colours.Red : Color4.White,
|
||||||
Y = 2,
|
Text = game.Version
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Sprite
|
||||||
|
{
|
||||||
|
// Anchor = Anchor.BottomCentre,
|
||||||
|
// Origin = Anchor.BottomCentre,
|
||||||
|
Texture = textures.Get(@"Menu/dev-build-footer"),
|
||||||
|
Scale = new Vector2(0.4f, 1),
|
||||||
|
Y = 2,
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
yield return createModColumnContent(ModType.Automation);
|
yield return createModColumnContent(ModType.Automation);
|
||||||
yield return createModColumnContent(ModType.Conversion);
|
yield return createModColumnContent(ModType.Conversion);
|
||||||
yield return createModColumnContent(ModType.Fun);
|
yield return createModColumnContent(ModType.Fun);
|
||||||
|
yield return createModColumnContent(ModType.Special);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ColumnDimContainer createModColumnContent(ModType modType)
|
private ColumnDimContainer createModColumnContent(ModType modType)
|
||||||
|
|||||||
22
osu.Game/Rulesets/Mods/IApplicableFailExit.cs
Normal file
22
osu.Game/Rulesets/Mods/IApplicableFailExit.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a mod which can override a fail and quit the game instead.
|
||||||
|
/// </summary>
|
||||||
|
public interface IApplicableFailExit : IApplicableMod
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether we should allow failing at the current point in time.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Whether the fail should be allowed to proceed. Return false to block.</returns>
|
||||||
|
bool PerformFail();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether we want to exit the game on fail. Only used if <see cref="PerformFail"/> returns true.
|
||||||
|
/// </summary>
|
||||||
|
bool ExitOnFail { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using osu.Game;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// An interface for mods that apply changes to the <see cref="OsuGameBase"/>.
|
|
||||||
/// This is really stupid and f%%king dangerous, possibly disasterous even.
|
|
||||||
/// </summary>
|
|
||||||
public interface IApplicableToOsuGameBase : IApplicableMod
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Provide a <see cref="OsuGameBase"/>. Called once on initialisation of a play instance.
|
|
||||||
/// </summary>
|
|
||||||
void ApplyToOsuGameBase(OsuGameBase game);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public virtual bool RequiresConfiguration => false;
|
public virtual bool RequiresConfiguration => false;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual bool Ranked => false;
|
public virtual bool Ranked => true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mods this mod cannot be enabled with.
|
/// The mods this mod cannot be enabled with.
|
||||||
@@ -127,7 +127,9 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// The settings are returned in ascending key order as per <see cref="SettingsMap"/>.
|
/// The settings are returned in ascending key order as per <see cref="SettingsMap"/>.
|
||||||
/// The ordering is intentionally enforced manually, as ordering of <see cref="Dictionary{TKey,TValue}.Values"/> is unspecified.
|
/// The ordering is intentionally enforced manually, as ordering of <see cref="Dictionary{TKey,TValue}.Values"/> is unspecified.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
internal IEnumerable<IBindable> SettingsBindables => SettingsMap.OrderBy(pair => pair.Key).Select(pair => pair.Value);
|
internal IEnumerable<IBindable> SettingsBindables => SettingsMap.OrderBy(pair => pair.Key)
|
||||||
|
.Select(pair => pair.Value)
|
||||||
|
.Where(x => !x.GetType().GetCustomAttributes(typeof(JsonIgnoreAttribute)).Any());
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides mapping of names to <see cref="IBindable"/>s of all settings within this mod.
|
/// Provides mapping of names to <see cref="IBindable"/>s of all settings within this mod.
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public sealed override bool UserPlayable => false;
|
public sealed override bool UserPlayable => false;
|
||||||
public sealed override bool ValidForMultiplayer => false;
|
public sealed override bool ValidForMultiplayer => false;
|
||||||
public sealed override bool ValidForMultiplayerAsFreeMod => false;
|
public sealed override bool ValidForMultiplayerAsFreeMod => false;
|
||||||
|
public override bool Ranked => false;
|
||||||
|
|
||||||
|
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModCinema), typeof(ModRelax), typeof(ModAdaptiveSpeed), typeof(ModTouchDevice) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModCinema), typeof(ModRelax), typeof(ModAdaptiveSpeed), typeof(ModTouchDevice) };
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override LocalisableString Description => "Watch the video without visual distractions.";
|
public override LocalisableString Description => "Watch the video without visual distractions.";
|
||||||
|
|
||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition) }).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition) }).ToArray();
|
||||||
|
public override bool Ranked => false;
|
||||||
|
|
||||||
public void ApplyToHUD(HUDOverlay overlay)
|
public void ApplyToHUD(HUDOverlay overlay)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// - Hit windows differ (https://github.com/ppy/osu/issues/11311).
|
/// - Hit windows differ (https://github.com/ppy/osu/issues/11311).
|
||||||
/// - Sliders always gives combo for slider end, even on miss (https://github.com/ppy/osu/issues/11769).
|
/// - Sliders always gives combo for slider end, even on miss (https://github.com/ppy/osu/issues/11769).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed override bool Ranked => false;
|
public sealed override bool Ranked => true;
|
||||||
|
|
||||||
public sealed override bool ValidForFreestyleAsRequiredMod => false;
|
public sealed override bool ValidForFreestyleAsRequiredMod => false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModDaycore;
|
public override IconUsage? Icon => OsuIcon.ModDaycore;
|
||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override LocalisableString Description => "Whoaaaaa...";
|
public override LocalisableString Description => "Whoaaaaa...";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
|
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Zoooooooooom...";
|
public override LocalisableString Description => "Zoooooooooom...";
|
||||||
public override bool Ranked => SpeedChange.IsDefault;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock), typeof(ModDifficultyAdjust) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
protected const float ADJUST_RATIO = 0.5f;
|
protected const float ADJUST_RATIO = 0.5f;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
@@ -9,17 +10,23 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Mods
|
namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
public abstract class ModFailCondition : Mod, IApplicableToHealthProcessor, IApplicableFailOverride
|
public abstract class ModFailCondition : Mod, IApplicableToHealthProcessor, IApplicableFailOverride, IApplicableFailExit
|
||||||
{
|
{
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModCinema) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModCinema) };
|
||||||
|
|
||||||
[SettingSource("Restart on fail", "Automatically restarts when failed.")]
|
[SettingSource("Restart on fail", "Automatically restarts when failed.")]
|
||||||
public BindableBool Restart { get; } = new BindableBool();
|
public BindableBool Restart { get; } = new BindableBool();
|
||||||
|
|
||||||
|
[SettingSource("Exit game on fail", "Automatically exits the game when failed."), JsonIgnore]
|
||||||
|
public BindableBool Exit { get; } = new BindableBool();
|
||||||
|
|
||||||
public virtual bool PerformFail() => true;
|
public virtual bool PerformFail() => true;
|
||||||
|
|
||||||
public virtual bool RestartOnFail => Restart.Value;
|
public virtual bool RestartOnFail => Restart.Value;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool ExitOnFail => Exit.Value;
|
||||||
|
|
||||||
private Action? triggerFailureDelegate;
|
private Action? triggerFailureDelegate;
|
||||||
|
|
||||||
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
||||||
@@ -39,7 +46,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="healthProcessor">The loaded <see cref="HealthProcessor"/>.</param>
|
/// <param name="healthProcessor">The loaded <see cref="HealthProcessor"/>.</param>
|
||||||
/// <param name="result">The latest <see cref="JudgementResult"/>.</param>
|
/// <param name="result">The latest <see cref="JudgementResult"/>.</param>
|
||||||
/// <returns>Whether the fail condition has been met.</returns>
|
/// <returns>Whether the fail condition has been met.</returns>z
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This method should only be used to trigger failures based on <paramref name="result"/>.
|
/// This method should only be used to trigger failures based on <paramref name="result"/>.
|
||||||
/// Using outside values to evaluate failure may introduce event ordering discrepancies, use
|
/// Using outside values to evaluate failure may introduce event ordering discrepancies, use
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModFlashlight;
|
public override IconUsage? Icon => OsuIcon.ModFlashlight;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Restricted view area.";
|
public override LocalisableString Description => "Restricted view area.";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||||
public abstract BindableFloat SizeMultiplier { get; }
|
public abstract BindableFloat SizeMultiplier { get; }
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModHalfTime;
|
public override IconUsage? Icon => OsuIcon.ModHalfTime;
|
||||||
public override ModType Type => ModType.DifficultyReduction;
|
public override ModType Type => ModType.DifficultyReduction;
|
||||||
public override LocalisableString Description => "Less zoom...";
|
public override LocalisableString Description => "Less zoom...";
|
||||||
public override bool Ranked => SpeedChange.IsDefault;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Everything just got a bit harder...";
|
public override LocalisableString Description => "Everything just got a bit harder...";
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModEasy), typeof(ModDifficultyAdjust) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
protected const float ADJUST_RATIO = 1.4f;
|
protected const float ADJUST_RATIO = 1.4f;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override string Acronym => "HD";
|
public override string Acronym => "HD";
|
||||||
public override IconUsage? Icon => OsuIcon.ModHidden;
|
public override IconUsage? Icon => OsuIcon.ModHidden;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
public virtual void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
public virtual void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override IconUsage? Icon => OsuIcon.ModNightcore;
|
public override IconUsage? Icon => OsuIcon.ModNightcore;
|
||||||
public override ModType Type => ModType.DifficultyIncrease;
|
public override ModType Type => ModType.DifficultyIncrease;
|
||||||
public override LocalisableString Description => "Uguuuuuuuu...";
|
public override LocalisableString Description => "Uguuuuuuuu...";
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
|
|
||||||
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
public override LocalisableString Description => "You can't fail, no matter what.";
|
public override LocalisableString Description => "You can't fail, no matter what.";
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition), typeof(ModCinema) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition), typeof(ModCinema) };
|
||||||
public override bool Ranked => UsesDefaultConfiguration;
|
public override bool Ranked => true;
|
||||||
public override bool ValidForFreestyleAsRequiredMod => true;
|
public override bool ValidForFreestyleAsRequiredMod => true;
|
||||||
|
|
||||||
private readonly Bindable<bool> showHealthBar = new Bindable<bool>();
|
private readonly Bindable<bool> showHealthBar = new Bindable<bool>();
|
||||||
|
|||||||
47
osu.Game/Rulesets/Mods/ModRateAdjustConcrete.cs
Normal file
47
osu.Game/Rulesets/Mods/ModRateAdjustConcrete.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Audio;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Overlays.Settings;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
public abstract class ModRateAdjustConcrete : ModRateAdjust
|
||||||
|
{
|
||||||
|
public override string Name => "Rate Adjust";
|
||||||
|
public override LocalisableString Description => "[DEBUG BUILDS ONLY] Set any speed";
|
||||||
|
public override string Acronym => "_R";
|
||||||
|
private readonly RateAdjustModHelper rateAdjustHelper;
|
||||||
|
|
||||||
|
[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
|
||||||
|
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||||
|
{
|
||||||
|
MinValue = 0.1, // BASS breaks at lower rates
|
||||||
|
MaxValue = 10,
|
||||||
|
Precision = 0.01
|
||||||
|
};
|
||||||
|
|
||||||
|
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||||
|
public virtual BindableBool AdjustPitch { get; } = new BindableBool();
|
||||||
|
|
||||||
|
|
||||||
|
protected ModRateAdjustConcrete()
|
||||||
|
{
|
||||||
|
rateAdjustHelper = new RateAdjustModHelper(SpeedChange);
|
||||||
|
rateAdjustHelper.HandleAudioAdjustments(AdjustPitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override double ScoreMultiplier => 1.0;
|
||||||
|
public override void ApplyToTrack(IAdjustableAudioComponent track)
|
||||||
|
{
|
||||||
|
rateAdjustHelper.ApplyToTrack(track);
|
||||||
|
}
|
||||||
|
public override bool Ranked => false;
|
||||||
|
public override ModType Type => ModType.Special;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
Conversion,
|
Conversion,
|
||||||
Automation,
|
Automation,
|
||||||
Fun,
|
Fun,
|
||||||
System
|
System,
|
||||||
|
Special
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ namespace osu.Game.Screens
|
|||||||
{
|
{
|
||||||
public partial class Loader : StartupScreen
|
public partial class Loader : StartupScreen
|
||||||
{
|
{
|
||||||
|
private bool showDisclaimer;
|
||||||
|
|
||||||
public Loader()
|
public Loader()
|
||||||
{
|
{
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
@@ -35,7 +37,13 @@ namespace osu.Game.Screens
|
|||||||
private LoadingSpinner spinner;
|
private LoadingSpinner spinner;
|
||||||
private ScheduledDelegate spinnerShow;
|
private ScheduledDelegate spinnerShow;
|
||||||
|
|
||||||
protected virtual OsuScreen CreateLoadableScreen() => getIntroSequence();
|
protected virtual OsuScreen CreateLoadableScreen()
|
||||||
|
{
|
||||||
|
if (showDisclaimer)
|
||||||
|
return new Disclaimer(getIntroSequence());
|
||||||
|
|
||||||
|
return getIntroSequence();
|
||||||
|
}
|
||||||
|
|
||||||
private IntroScreen getIntroSequence()
|
private IntroScreen getIntroSequence()
|
||||||
{
|
{
|
||||||
@@ -106,8 +114,9 @@ namespace osu.Game.Screens
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuGameBase game, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
showDisclaimer = game.IsDeployedBuild || !DebugUtils.IsDebugBuild;
|
||||||
introSequence = config.Get<IntroSequence>(OsuSetting.IntroSequence);
|
introSequence = config.Get<IntroSequence>(OsuSetting.IntroSequence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
161
osu.Game/Screens/Menu/Disclaimer.cs
Normal file
161
osu.Game/Screens/Menu/Disclaimer.cs
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Menu
|
||||||
|
{
|
||||||
|
public partial class Disclaimer : StartupScreen
|
||||||
|
{
|
||||||
|
private SpriteIcon icon;
|
||||||
|
private Color4 iconColour;
|
||||||
|
private LinkFlowContainer textFlow;
|
||||||
|
private const float icon_y = -85;
|
||||||
|
private const float icon_size = 30;
|
||||||
|
|
||||||
|
private readonly OsuScreen nextScreen;
|
||||||
|
|
||||||
|
private readonly Bindable<APIUser> currentUser = new Bindable<APIUser>();
|
||||||
|
private FillFlowContainer fill;
|
||||||
|
|
||||||
|
private readonly List<ITextPart> expendableText = new List<ITextPart>();
|
||||||
|
|
||||||
|
public Disclaimer(OsuScreen nextScreen = null)
|
||||||
|
{
|
||||||
|
this.nextScreen = nextScreen;
|
||||||
|
ValidForResume = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
InternalChildren = new Drawable[]
|
||||||
|
{
|
||||||
|
icon = new SpriteIcon
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Icon = FontAwesome.Solid.ExclamationTriangle,
|
||||||
|
Size = new Vector2(icon_size),
|
||||||
|
Y = icon_y,
|
||||||
|
},
|
||||||
|
fill = new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Y = icon_y,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
textFlow = new LinkFlowContainer
|
||||||
|
{
|
||||||
|
Width = 680,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
TextAnchor = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Spacing = new Vector2(0, 2),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
textFlow.AddText("Disclaimer", t => t.Font = t.Font.With(Typeface.Torus, 30, FontWeight.Regular));
|
||||||
|
|
||||||
|
|
||||||
|
static void formatRegular(SpriteText t) => t.Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular);
|
||||||
|
static void formatSemiBold(SpriteText t) => t.Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold);
|
||||||
|
|
||||||
|
textFlow.NewParagraph();
|
||||||
|
textFlow.AddText("This is ", formatRegular);
|
||||||
|
textFlow.AddText("jvnkosu!", formatSemiBold);
|
||||||
|
textFlow.AddText(", an unofficial osu!(lazer) server based on official source code.", formatRegular);
|
||||||
|
textFlow.NewParagraph();
|
||||||
|
textFlow.AddText("We are not in any way affiliated with, or endorsed by, the osu! team.", formatSemiBold);
|
||||||
|
textFlow.NewParagraph();
|
||||||
|
textFlow.NewParagraph();
|
||||||
|
textFlow.AddText("Thank you, and have fun!", formatRegular);
|
||||||
|
|
||||||
|
iconColour = colours.Yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
if (nextScreen != null)
|
||||||
|
LoadComponentAsync(nextScreen);
|
||||||
|
|
||||||
|
((IBindable<APIUser>)currentUser).BindTo(api.LocalUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSuspending(ScreenTransitionEvent e)
|
||||||
|
{
|
||||||
|
base.OnSuspending(e);
|
||||||
|
|
||||||
|
// Once this screen has finished being displayed, we don't want to unnecessarily handle user change events.
|
||||||
|
currentUser.UnbindAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEntering(ScreenTransitionEvent e)
|
||||||
|
{
|
||||||
|
base.OnEntering(e);
|
||||||
|
|
||||||
|
// icon.RotateTo(10);
|
||||||
|
icon.FadeOut();
|
||||||
|
icon.ScaleTo(0.5f);
|
||||||
|
|
||||||
|
icon.Delay(500).FadeIn(50).ScaleTo(1, 500, Easing.OutQuint);
|
||||||
|
fill.MoveToOffset(new Vector2(0, 15), 0, Easing.OutQuart);
|
||||||
|
|
||||||
|
using (BeginDelayedSequence(3000))
|
||||||
|
{
|
||||||
|
icon.MoveToY(icon_y, 0, Easing.InQuart)
|
||||||
|
.FadeColour(Color4.White, 160)
|
||||||
|
.Then()
|
||||||
|
.FadeColour(iconColour, 200, Easing.OutQuint);
|
||||||
|
|
||||||
|
Schedule(() => expendableText.SelectMany(t => t.Drawables).ForEach(t =>
|
||||||
|
{
|
||||||
|
t.FadeOut(100);
|
||||||
|
t.ScaleTo(new Vector2(0, 1), 100, Easing.OutQuart);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
double delay = 500;
|
||||||
|
foreach (var c in textFlow.Children)
|
||||||
|
c.FadeTo(0.001f).Delay(delay += 20).FadeIn(500);
|
||||||
|
|
||||||
|
this
|
||||||
|
.FadeInFromZero(500)
|
||||||
|
.Then(5500)
|
||||||
|
.FadeOut(250)
|
||||||
|
.ScaleTo(0.9f, 250, Easing.InQuint)
|
||||||
|
.Finally(_ =>
|
||||||
|
{
|
||||||
|
if (nextScreen != null)
|
||||||
|
this.Push(nextScreen);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -411,7 +411,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
// if the dialog has already displayed and been accepted by the user, we are good.
|
// if the dialog has already displayed and been accepted by the user, we are good.
|
||||||
&& !exitConfirmedViaDialog
|
&& !exitConfirmedViaDialog
|
||||||
// Only require confirmation if there is either an ongoing operation or the user exited via a non-hold escape press.
|
// Only require confirmation if there is either an ongoing operation or the user exited via a non-hold escape press.
|
||||||
&& (notifications.HasOngoingOperations || !exitConfirmedViaHoldOrClick);
|
&& (notifications.HasOngoingOperations /* || !exitConfirmedViaHoldOrClick */);
|
||||||
|
|
||||||
if (requiresConfirmation)
|
if (requiresConfirmation)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,11 +18,13 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Utils;
|
using osu.Game.Utils;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@@ -40,6 +42,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public Action? OnResume { get; init; }
|
public Action? OnResume { get; init; }
|
||||||
public Action? OnRetry { get; init; }
|
public Action? OnRetry { get; init; }
|
||||||
public Action? OnQuit { get; init; }
|
public Action? OnQuit { get; init; }
|
||||||
|
public Action? OnQuitReplay { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
|
||||||
@@ -69,6 +72,8 @@ namespace osu.Game.Screens.Play
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private GlobalActionContainer globalAction { get; set; } = null!;
|
private GlobalActionContainer globalAction { get; set; } = null!;
|
||||||
|
|
||||||
|
private ShearedButton saveReplay { get; set; } = null!;
|
||||||
|
|
||||||
protected GameplayMenuOverlay()
|
protected GameplayMenuOverlay()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
@@ -90,7 +95,7 @@ namespace osu.Game.Screens.Play
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0, 50),
|
Spacing = new Vector2(0, 25),
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@@ -118,6 +123,15 @@ namespace osu.Game.Screens.Play
|
|||||||
Radius = 50
|
Radius = 50
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
saveReplay = new ShearedButton
|
||||||
|
{
|
||||||
|
Text = "Quit and save replay",
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Height = 32,
|
||||||
|
Colour = colours.PurpleLight,
|
||||||
|
// Visibility = false
|
||||||
|
},
|
||||||
playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18))
|
playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18))
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@@ -138,6 +152,12 @@ namespace osu.Game.Screens.Play
|
|||||||
if (OnQuit != null)
|
if (OnQuit != null)
|
||||||
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke());
|
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke());
|
||||||
|
|
||||||
|
if (OnQuitReplay != null)
|
||||||
|
{
|
||||||
|
// saveReplay.Visibility = true;
|
||||||
|
saveReplay.Action = () => OnQuitReplay.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
State.ValueChanged += _ => InternalButtons.Deselect();
|
State.ValueChanged += _ => InternalButtons.Deselect();
|
||||||
|
|
||||||
updateInfoText();
|
updateInfoText();
|
||||||
|
|||||||
@@ -516,6 +516,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Retries = RestartCount,
|
Retries = RestartCount,
|
||||||
OnRetry = () => Restart(),
|
OnRetry = () => Restart(),
|
||||||
OnQuit = () => PerformExitWithConfirmation(),
|
OnQuit = () => PerformExitWithConfirmation(),
|
||||||
|
OnQuitReplay = () => PerformExitReplay()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -701,6 +702,20 @@ namespace osu.Game.Screens.Play
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX: replays saved from pause screen, when played back, will continue playing past the point player quits
|
||||||
|
// unfixable because it's not possible to manually trigger a failure in a way that would be recorded (w/o using a mod)
|
||||||
|
protected void PerformExitReplay()
|
||||||
|
{
|
||||||
|
// manually triggering a failure in a messy manner to avoid score submission
|
||||||
|
GameplayClockContainer.Stop();
|
||||||
|
GameplayState.HasFailed = true;
|
||||||
|
updateGameplayState();
|
||||||
|
ConcludeFailedScore(Score);
|
||||||
|
|
||||||
|
prepareAndImportScoreAsync(true);
|
||||||
|
PerformExit();
|
||||||
|
}
|
||||||
|
|
||||||
private void performUserRequestedSkip()
|
private void performUserRequestedSkip()
|
||||||
{
|
{
|
||||||
// user requested skip
|
// user requested skip
|
||||||
@@ -968,6 +983,14 @@ namespace osu.Game.Screens.Play
|
|||||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||||
PauseOverlay.Hide();
|
PauseOverlay.Hide();
|
||||||
|
|
||||||
|
bool exitOnFail = GameplayState.Mods.OfType<IApplicableFailExit>().Any(m => m.ExitOnFail);
|
||||||
|
if (exitOnFail)
|
||||||
|
{
|
||||||
|
// game.AttemptExit();
|
||||||
|
game.Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
|
||||||
if (!restartOnFail)
|
if (!restartOnFail)
|
||||||
failAnimationContainer.Start();
|
failAnimationContainer.Start();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
Spacing = new Vector2(-15, 0),
|
Spacing = new Vector2(-15, 0),
|
||||||
Text = DrawableRank.GetRankLetter(rank),
|
Text = DrawableRank.GetRankLetter(rank),
|
||||||
// Font = OsuFont.Numeric.With(size: 76),
|
// Font = OsuFont.Numeric.With(size: 76),
|
||||||
Font = OsuFont.TorusAlternate.With(size: 128, weight: FontWeight.Bold),
|
Font = OsuFont.TorusAlternate.With(size: 100, weight: FontWeight.Bold),
|
||||||
UseFullGlyphHeight = false
|
UseFullGlyphHeight = false
|
||||||
},
|
},
|
||||||
superFlash = new BufferedContainer(cachedFrameBuffer: true)
|
superFlash = new BufferedContainer(cachedFrameBuffer: true)
|
||||||
@@ -89,7 +89,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Spacing = new Vector2(-15, 0),
|
Spacing = new Vector2(-15, 0),
|
||||||
Text = DrawableRank.GetRankLetter(rank),
|
Text = DrawableRank.GetRankLetter(rank),
|
||||||
Font = OsuFont.Numeric.With(size: 76),
|
Font = OsuFont.TorusAlternate.With(size: 100, weight: FontWeight.Bold),
|
||||||
UseFullGlyphHeight = false,
|
UseFullGlyphHeight = false,
|
||||||
Shadow = false
|
Shadow = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ namespace osu.Game.Screens.SelectV2
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Spacing = new Vector2(-2),
|
Spacing = new Vector2(-2),
|
||||||
Colour = DrawableRank.GetRankLetterColour(Score.Rank),
|
Colour = DrawableRank.GetRankLetterColour(Score.Rank),
|
||||||
Font = OsuFont.Numeric.With(size: 14),
|
Font = OsuFont.TorusAlternate.With(size: 24, weight: FontWeight.Bold),
|
||||||
Text = DrawableRank.GetRankLetter(Score.Rank),
|
Text = DrawableRank.GetRankLetter(Score.Rank),
|
||||||
ShadowColour = Color4.Black.Opacity(0.3f),
|
ShadowColour = Color4.Black.Opacity(0.3f),
|
||||||
ShadowOffset = new Vector2(0, 0.08f),
|
ShadowOffset = new Vector2(0, 0.08f),
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace osu.Game.Updater
|
|||||||
{
|
{
|
||||||
bool includePrerelease = stream == Configuration.ReleaseStream.Tachyon;
|
bool includePrerelease = stream == Configuration.ReleaseStream.Tachyon;
|
||||||
|
|
||||||
OsuJsonWebRequest<GitHubRelease[]> releasesRequest = new OsuJsonWebRequest<GitHubRelease[]>("https://api.github.com/repos/ppy/osu/releases?per_page=10&page=1");
|
OsuJsonWebRequest<GitHubRelease[]> releasesRequest = new OsuJsonWebRequest<GitHubRelease[]>("https://gitea.jvnko.boats/api/v1/repos/jvnkosu/client/releases?limit=10&page=1");
|
||||||
await releasesRequest.PerformAsync(cancellationToken).ConfigureAwait(false);
|
await releasesRequest.PerformAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
GitHubRelease[] releases = releasesRequest.ResponseObject;
|
GitHubRelease[] releases = releasesRequest.ResponseObject;
|
||||||
|
|||||||
@@ -770,6 +770,9 @@ namespace osu.Game.Users
|
|||||||
[Description("Samoa")]
|
[Description("Samoa")]
|
||||||
WS,
|
WS,
|
||||||
|
|
||||||
|
[Description("Gensokyo")]
|
||||||
|
XG,
|
||||||
|
|
||||||
[Description("Kosovo")]
|
[Description("Kosovo")]
|
||||||
XK,
|
XK,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user