File tree 2 files changed +55
-0
lines changed
tau/osu.Game.Rulesets.tau
2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+
// Copyright (c) ppy Pty Ltd <[email protected] >. Licensed under the MIT Licence.
2
+ // See the LICENCE file in the repository root for full licence text.
3
+
4
+ using osu . Framework . Bindables ;
5
+ using osu . Game . Beatmaps ;
6
+ using osu . Game . Configuration ;
7
+ using osu . Game . Rulesets . Mods ;
8
+
9
+ namespace osu . Game . Rulesets . Tau . Mods
10
+ {
11
+ public class TauModDifficultyAdjust : ModDifficultyAdjust
12
+ {
13
+ [ SettingSource ( "Paddle Size" , "Override a beatmap's set PS." ) ]
14
+ public BindableNumber < float > PaddleSize { get ; } = new BindableFloat
15
+ {
16
+ Precision = 0.1f ,
17
+ MinValue = 1 ,
18
+ MaxValue = 10 ,
19
+ Default = 5 ,
20
+ Value = 5 ,
21
+ } ;
22
+
23
+ [ SettingSource ( "Approach Rate" , "Override a beatmap's set AR." ) ]
24
+ public BindableNumber < float > ApproachRate { get ; } = new BindableFloat
25
+ {
26
+ Precision = 0.1f ,
27
+ MinValue = 1 ,
28
+ MaxValue = 10 ,
29
+ Default = 5 ,
30
+ Value = 5 ,
31
+ } ;
32
+
33
+ protected override void TransferSettings ( BeatmapDifficulty difficulty )
34
+ {
35
+ base . TransferSettings ( difficulty ) ;
36
+
37
+ TransferSetting ( PaddleSize , difficulty . CircleSize ) ;
38
+ TransferSetting ( ApproachRate , difficulty . ApproachRate ) ;
39
+ }
40
+
41
+ protected override void ApplySettings ( BeatmapDifficulty difficulty )
42
+ {
43
+ base . ApplySettings ( difficulty ) ;
44
+
45
+ difficulty . CircleSize = PaddleSize . Value ;
46
+ difficulty . ApproachRate = ApproachRate . Value ;
47
+ }
48
+ }
49
+ }
Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
65
65
new TauModRelax ( ) ,
66
66
} ;
67
67
68
+ case ModType . Conversion :
69
+ return new Mod [ ]
70
+ {
71
+ new TauModDifficultyAdjust ( ) ,
72
+ } ;
73
+
68
74
case ModType . Fun :
69
75
return new Mod [ ]
70
76
{
You can’t perform that action at this time.
0 commit comments