mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:43:21 +08:00
Merge branch 'master' into leaderboard-nrt
This commit is contained in:
commit
c969afcb71
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -4,6 +4,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
inspect-code:
|
||||
name: Code Quality
|
||||
|
4
.github/workflows/report-nunit.yml
vendored
4
.github/workflows/report-nunit.yml
vendored
@ -8,8 +8,12 @@ on:
|
||||
workflows: ["Continuous Integration"]
|
||||
types:
|
||||
- completed
|
||||
permissions: {}
|
||||
jobs:
|
||||
annotate:
|
||||
permissions:
|
||||
checks: write # to create checks (dorny/test-reporter)
|
||||
|
||||
name: Annotate CI run with test results
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }}
|
||||
|
3
.github/workflows/sentry-release.yml
vendored
3
.github/workflows/sentry-release.yml
vendored
@ -5,6 +5,9 @@ on:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
sentry_release:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -17,21 +17,15 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||
|
||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 1.5f,
|
||||
Default = 1f,
|
||||
Value = 1f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||
|
||||
public override float DefaultFlashlightSize => 350;
|
||||
|
||||
|
@ -22,10 +22,8 @@ namespace osu.Game.Rulesets.Catch.Mods
|
||||
"The combo count at which the catcher becomes completely hidden",
|
||||
SettingControlType = typeof(SettingsSlider<int, HiddenComboSlider>)
|
||||
)]
|
||||
public override BindableInt HiddenComboCount { get; } = new BindableInt
|
||||
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
||||
{
|
||||
Default = 10,
|
||||
Value = 10,
|
||||
MinValue = 0,
|
||||
MaxValue = 50,
|
||||
};
|
||||
|
@ -18,21 +18,15 @@ namespace osu.Game.Rulesets.Mania.Mods
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModHidden) };
|
||||
|
||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 3f,
|
||||
Default = 1f,
|
||||
Value = 1f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool
|
||||
{
|
||||
Default = false,
|
||||
Value = false
|
||||
};
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool();
|
||||
|
||||
public override float DefaultFlashlightSize => 50;
|
||||
|
||||
|
@ -19,12 +19,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override LocalisableString Description => "Hit them at the right size!";
|
||||
|
||||
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat(2)
|
||||
{
|
||||
MinValue = 1f,
|
||||
MaxValue = 25f,
|
||||
Default = 2f,
|
||||
Value = 2f,
|
||||
Precision = 0.1f,
|
||||
};
|
||||
}
|
||||
|
@ -33,21 +33,15 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
};
|
||||
|
||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 2f,
|
||||
Default = 1f,
|
||||
Value = 1f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||
|
||||
public override float DefaultFlashlightSize => 180;
|
||||
|
||||
|
@ -19,12 +19,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override LocalisableString Description => "Hit them at the right size!";
|
||||
|
||||
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat(0.5f)
|
||||
{
|
||||
MinValue = 0f,
|
||||
MaxValue = 0.99f,
|
||||
Default = 0.5f,
|
||||
Value = 0.5f,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
}
|
||||
|
@ -27,10 +27,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
"The combo count at which the cursor becomes completely hidden",
|
||||
SettingControlType = typeof(SettingsSlider<int, HiddenComboSlider>)
|
||||
)]
|
||||
public override BindableInt HiddenComboCount { get; } = new BindableInt
|
||||
public override BindableInt HiddenComboCount { get; } = new BindableInt(10)
|
||||
{
|
||||
Default = 10,
|
||||
Value = 10,
|
||||
MinValue = 0,
|
||||
MaxValue = 50,
|
||||
};
|
||||
|
@ -29,10 +29,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModTarget)).ToArray();
|
||||
|
||||
[SettingSource("Angle sharpness", "How sharp angles should be", SettingControlType = typeof(SettingsSlider<float>))]
|
||||
public BindableFloat AngleSharpness { get; } = new BindableFloat
|
||||
public BindableFloat AngleSharpness { get; } = new BindableFloat(7)
|
||||
{
|
||||
Default = 7,
|
||||
Value = 7,
|
||||
MinValue = 1,
|
||||
MaxValue = 10,
|
||||
Precision = 0.1f
|
||||
|
@ -53,11 +53,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
}).ToArray();
|
||||
|
||||
[SettingSource("Seed", "Use a custom seed instead of a random one", SettingControlType = typeof(SettingsNumberBox))]
|
||||
public Bindable<int?> Seed { get; } = new Bindable<int?>
|
||||
{
|
||||
Default = null,
|
||||
Value = null
|
||||
};
|
||||
public Bindable<int?> Seed { get; } = new Bindable<int?>();
|
||||
|
||||
[SettingSource("Metronome ticks", "Whether a metronome beat should play in the background")]
|
||||
public Bindable<bool> Metronome { get; } = new BindableBool(true);
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
};
|
||||
|
||||
accentColour = hitObject.AccentColour.GetBoundCopy();
|
||||
accentColour.BindValueChanged(accent => BorderColour = accent.NewValue);
|
||||
accentColour.BindValueChanged(accent => BorderColour = accent.NewValue, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,21 +18,15 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
||||
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
|
||||
|
||||
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat
|
||||
public override BindableFloat SizeMultiplier { get; } = new BindableFloat(1)
|
||||
{
|
||||
MinValue = 0.5f,
|
||||
MaxValue = 1.5f,
|
||||
Default = 1f,
|
||||
Value = 1f,
|
||||
Precision = 0.1f
|
||||
};
|
||||
|
||||
[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool ComboBasedSize { get; } = new BindableBool(true);
|
||||
|
||||
public override float DefaultFlashlightSize => 250;
|
||||
|
||||
|
@ -204,31 +204,23 @@ namespace osu.Game.Tests.Online
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1.5)
|
||||
{
|
||||
MinValue = 1,
|
||||
MaxValue = 2,
|
||||
Default = 1.5,
|
||||
Value = 1.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.5)
|
||||
{
|
||||
MinValue = 0,
|
||||
MaxValue = 1,
|
||||
Default = 0.5,
|
||||
Value = 0.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||
}
|
||||
|
||||
private class TestModDifficultyAdjust : ModDifficultyAdjust
|
||||
|
@ -124,31 +124,23 @@ namespace osu.Game.Tests.Online
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1.5)
|
||||
{
|
||||
MinValue = 1,
|
||||
MaxValue = 2,
|
||||
Default = 1.5,
|
||||
Value = 1.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.5)
|
||||
{
|
||||
MinValue = 0,
|
||||
MaxValue = 1,
|
||||
Default = 0.5,
|
||||
Value = 0.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||
}
|
||||
|
||||
private class TestModEnum : Mod
|
||||
|
@ -29,11 +29,7 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
{
|
||||
Child = textBox = new SettingsTextBox
|
||||
{
|
||||
Current = new Bindable<string>
|
||||
{
|
||||
Default = "test",
|
||||
Value = "test"
|
||||
}
|
||||
Current = new Bindable<string>("test")
|
||||
};
|
||||
});
|
||||
AddUntilStep("wait for loaded", () => textBox.IsLoaded);
|
||||
@ -59,11 +55,7 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
{
|
||||
Child = textBox = new SettingsTextBox
|
||||
{
|
||||
Current = new Bindable<string>
|
||||
{
|
||||
Default = "test",
|
||||
Value = "test"
|
||||
}
|
||||
Current = new Bindable<string>("test")
|
||||
};
|
||||
});
|
||||
AddUntilStep("wait for loaded", () => textBox.IsLoaded);
|
||||
|
@ -67,11 +67,7 @@ namespace osu.Game.Tests.Visual.Settings
|
||||
};
|
||||
|
||||
[SettingSource("Sample number textbox", "Textbox number entry", SettingControlType = typeof(SettingsNumberBox))]
|
||||
public Bindable<int?> IntTextBoxBindable { get; } = new Bindable<int?>
|
||||
{
|
||||
Default = null,
|
||||
Value = null
|
||||
};
|
||||
public Bindable<int?> IntTextBoxBindable { get; } = new Bindable<int?>();
|
||||
}
|
||||
|
||||
private enum TestEnum
|
||||
|
@ -24,7 +24,6 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
public readonly BindableDouble SliderVelocityBindable = new BindableDouble(1)
|
||||
{
|
||||
Precision = 0.01,
|
||||
Default = 1,
|
||||
MinValue = 0.1,
|
||||
MaxValue = 10
|
||||
};
|
||||
|
@ -28,7 +28,6 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
public readonly BindableDouble ScrollSpeedBindable = new BindableDouble(1)
|
||||
{
|
||||
Precision = 0.01,
|
||||
Default = 1,
|
||||
MinValue = 0.01,
|
||||
MaxValue = 10
|
||||
};
|
||||
|
@ -45,7 +45,6 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
MinValue = 0,
|
||||
MaxValue = 100,
|
||||
Default = 100
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
@ -49,7 +49,6 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// </summary>
|
||||
public readonly BindableDouble BeatLengthBindable = new BindableDouble(DEFAULT_BEAT_LENGTH)
|
||||
{
|
||||
Default = DEFAULT_BEAT_LENGTH,
|
||||
MinValue = 6,
|
||||
MaxValue = 60000
|
||||
};
|
||||
|
@ -36,32 +36,24 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModRateAdjust), typeof(ModTimeRamp), typeof(ModAutoplay) };
|
||||
|
||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||
public BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||
public BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
||||
{
|
||||
MinValue = 0.5,
|
||||
MaxValue = 2,
|
||||
Default = 1,
|
||||
Value = 1,
|
||||
Precision = 0.01
|
||||
};
|
||||
|
||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||
public BindableBool AdjustPitch { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||
|
||||
/// <summary>
|
||||
/// The instantaneous rate of the track.
|
||||
/// Every frame this mod will attempt to smoothly adjust this to meet <see cref="targetRate"/>.
|
||||
/// </summary>
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble(1)
|
||||
{
|
||||
MinValue = min_allowable_rate,
|
||||
MaxValue = max_allowable_rate,
|
||||
Default = 1,
|
||||
Value = 1
|
||||
};
|
||||
|
||||
// The two constants below denote the maximum allowable range of rates that `SpeedChange` can take.
|
||||
|
@ -18,12 +18,10 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override LocalisableString Description => "Zoooooooooom...";
|
||||
|
||||
[SettingSource("Speed increase", "The actual increase to apply")]
|
||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
|
||||
{
|
||||
MinValue = 1.01,
|
||||
MaxValue = 2,
|
||||
Default = 1.5,
|
||||
Value = 1.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
}
|
||||
|
@ -18,12 +18,10 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override LocalisableString Description => "Less zoom...";
|
||||
|
||||
[SettingSource("Speed decrease", "The actual decrease to apply")]
|
||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
|
||||
{
|
||||
MinValue = 0.5,
|
||||
MaxValue = 0.99,
|
||||
Default = 0.75,
|
||||
Value = 0.75,
|
||||
Precision = 0.01,
|
||||
};
|
||||
}
|
||||
|
@ -36,34 +36,20 @@ namespace osu.Game.Rulesets.Mods
|
||||
private readonly BindableNumber<int> currentCombo = new BindableInt();
|
||||
|
||||
[SettingSource("Enable metronome", "Add a metronome beat to help you keep track of the rhythm.")]
|
||||
public BindableBool EnableMetronome { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public BindableBool EnableMetronome { get; } = new BindableBool(true);
|
||||
|
||||
[SettingSource("Final volume at combo", "The combo count at which point the track reaches its final volume.", SettingControlType = typeof(SettingsSlider<int, MuteComboSlider>))]
|
||||
public BindableInt MuteComboCount { get; } = new BindableInt
|
||||
public BindableInt MuteComboCount { get; } = new BindableInt(100)
|
||||
{
|
||||
Default = 100,
|
||||
Value = 100,
|
||||
MinValue = 0,
|
||||
MaxValue = 500,
|
||||
};
|
||||
|
||||
[SettingSource("Start muted", "Increase volume as combo builds.")]
|
||||
public BindableBool InverseMuting { get; } = new BindableBool
|
||||
{
|
||||
Default = false,
|
||||
Value = false
|
||||
};
|
||||
public BindableBool InverseMuting { get; } = new BindableBool();
|
||||
|
||||
[SettingSource("Mute hit sounds", "Hit sounds are also muted alongside the track.")]
|
||||
public BindableBool AffectsHitSounds { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public BindableBool AffectsHitSounds { get; } = new BindableBool(true);
|
||||
|
||||
protected ModMuted()
|
||||
{
|
||||
|
@ -18,10 +18,6 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
[SettingSource("Seed", "Use a custom seed instead of a random one", SettingControlType = typeof(SettingsNumberBox))]
|
||||
public Bindable<int?> Seed { get; } = new Bindable<int?>
|
||||
{
|
||||
Default = null,
|
||||
Value = null
|
||||
};
|
||||
public Bindable<int?> Seed { get; } = new Bindable<int?>();
|
||||
}
|
||||
}
|
||||
|
@ -39,10 +39,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
private double finalRateTime;
|
||||
private double beginRampTime;
|
||||
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble
|
||||
public BindableNumber<double> SpeedChange { get; } = new BindableDouble(1)
|
||||
{
|
||||
Default = 1,
|
||||
Value = 1,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
|
@ -18,31 +18,23 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown;
|
||||
|
||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
||||
{
|
||||
MinValue = 0.51,
|
||||
MaxValue = 2,
|
||||
Default = 1,
|
||||
Value = 1,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(0.75)
|
||||
{
|
||||
MinValue = 0.5,
|
||||
MaxValue = 1.99,
|
||||
Default = 0.75,
|
||||
Value = 0.75,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindUp)).ToArray();
|
||||
|
||||
|
@ -18,31 +18,23 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp;
|
||||
|
||||
[SettingSource("Initial rate", "The starting speed of the track")]
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> InitialRate { get; } = new BindableDouble(1)
|
||||
{
|
||||
MinValue = 0.5,
|
||||
MaxValue = 1.99,
|
||||
Default = 1,
|
||||
Value = 1,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble(1.5)
|
||||
{
|
||||
MinValue = 0.51,
|
||||
MaxValue = 2,
|
||||
Default = 1.5,
|
||||
Value = 1.5,
|
||||
Precision = 0.01,
|
||||
};
|
||||
|
||||
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool
|
||||
{
|
||||
Default = true,
|
||||
Value = true
|
||||
};
|
||||
public override BindableBool AdjustPitch { get; } = new BindableBool(true);
|
||||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModWindDown)).ToArray();
|
||||
|
||||
|
@ -60,7 +60,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
/// </summary>
|
||||
protected readonly BindableDouble TimeRange = new BindableDouble(time_span_default)
|
||||
{
|
||||
Default = time_span_default,
|
||||
MinValue = time_span_min,
|
||||
MaxValue = time_span_max
|
||||
};
|
||||
|
@ -424,7 +424,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
|
||||
private void hideError() => ErrorText.FadeOut(50);
|
||||
|
||||
private void onSuccess(Room room)
|
||||
private void onSuccess(Room room) => Schedule(() =>
|
||||
{
|
||||
Debug.Assert(applyingSettingsOperation != null);
|
||||
|
||||
@ -432,9 +432,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
|
||||
applyingSettingsOperation.Dispose();
|
||||
applyingSettingsOperation = null;
|
||||
}
|
||||
});
|
||||
|
||||
private void onError(string text)
|
||||
private void onError(string text) => Schedule(() =>
|
||||
{
|
||||
Debug.Assert(applyingSettingsOperation != null);
|
||||
|
||||
@ -455,7 +455,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
|
||||
applyingSettingsOperation.Dispose();
|
||||
applyingSettingsOperation = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public class CreateOrUpdateButton : TriangleButton
|
||||
|
@ -1,8 +1,6 @@
|
||||
// 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;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
|
@ -1,8 +1,6 @@
|
||||
// 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;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
@ -12,6 +10,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
@ -34,19 +33,20 @@ namespace osu.Game.Screens.Play.HUD
|
||||
public readonly SortedDictionary<int, BindableLong> TeamScores = new SortedDictionary<int, BindableLong>();
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private SpectatorClient spectatorClient { get; set; }
|
||||
private SpectatorClient spectatorClient { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private MultiplayerClient multiplayerClient { get; set; }
|
||||
private MultiplayerClient multiplayerClient { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private UserLookupCache userLookupCache { get; set; }
|
||||
private UserLookupCache userLookupCache { get; set; } = null!;
|
||||
|
||||
private Bindable<ScoringMode> scoringMode = null!;
|
||||
|
||||
private readonly MultiplayerRoomUser[] playingUsers;
|
||||
private Bindable<ScoringMode> scoringMode;
|
||||
|
||||
private readonly IBindableList<int> playingUserIds = new BindableList<int>();
|
||||
|
||||
@ -126,14 +126,17 @@ namespace osu.Game.Screens.Play.HUD
|
||||
playingUserIds.BindCollectionChanged(playingUsersChanged);
|
||||
}
|
||||
|
||||
protected override GameplayLeaderboardScore CreateLeaderboardScoreDrawable(IUser user, bool isTracked)
|
||||
protected override GameplayLeaderboardScore CreateLeaderboardScoreDrawable(IUser? user, bool isTracked)
|
||||
{
|
||||
var leaderboardScore = base.CreateLeaderboardScoreDrawable(user, isTracked);
|
||||
|
||||
if (UserScores[user.OnlineID].Team is int team)
|
||||
if (user != null)
|
||||
{
|
||||
leaderboardScore.BackgroundColour = getTeamColour(team).Lighten(1.2f);
|
||||
leaderboardScore.TextColour = Color4.White;
|
||||
if (UserScores[user.OnlineID].Team is int team)
|
||||
{
|
||||
leaderboardScore.BackgroundColour = getTeamColour(team).Lighten(1.2f);
|
||||
leaderboardScore.TextColour = Color4.White;
|
||||
}
|
||||
}
|
||||
|
||||
return leaderboardScore;
|
||||
@ -189,7 +192,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
if (spectatorClient != null)
|
||||
if (spectatorClient.IsNotNull())
|
||||
{
|
||||
foreach (var user in playingUsers)
|
||||
spectatorClient.StopWatchingUser(user.UserID);
|
||||
|
@ -34,7 +34,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public readonly BindableNumber<double> UserPlaybackRate = new BindableDouble(1)
|
||||
{
|
||||
Default = 1,
|
||||
MinValue = 0.5,
|
||||
MaxValue = 2,
|
||||
Precision = 0.1,
|
||||
|
@ -31,8 +31,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
|
||||
public BindableDouble Current { get; } = new BindableDouble
|
||||
{
|
||||
Default = 0,
|
||||
Value = 0,
|
||||
MinValue = -50,
|
||||
MaxValue = 50,
|
||||
Precision = 0.1,
|
||||
|
@ -17,7 +17,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
|
||||
public readonly Bindable<double> UserPlaybackRate = new BindableDouble(1)
|
||||
{
|
||||
Default = 1,
|
||||
MinValue = 0.5,
|
||||
MaxValue = 2,
|
||||
Precision = 0.1,
|
||||
|
@ -10,7 +10,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Animations;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
@ -91,6 +91,9 @@ namespace osu.Game.Storyboards.Drawables
|
||||
[Resolved]
|
||||
private ISkinSource skin { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IBeatSyncProvider beatSyncProvider { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textureStore, Storyboard storyboard)
|
||||
{
|
||||
@ -116,9 +119,6 @@ namespace osu.Game.Storyboards.Drawables
|
||||
Animation.ApplyTransforms(this);
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private IGameplayClock gameplayClock { get; set; }
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -128,7 +128,7 @@ namespace osu.Game.Storyboards.Drawables
|
||||
//
|
||||
// In the case of storyboard animations, we want to synchronise with game time perfectly
|
||||
// so let's get a correct time based on gameplay clock and earliest transform.
|
||||
PlaybackPosition = gameplayClock.CurrentTime - Animation.EarliestTransformTime;
|
||||
PlaybackPosition = (beatSyncProvider.Clock?.CurrentTime ?? Clock.CurrentTime) - Animation.EarliestTransformTime;
|
||||
}
|
||||
|
||||
private void skinSourceChanged()
|
||||
|
Loading…
Reference in New Issue
Block a user