Skip to content

Commit

Permalink
refactor(stubs): reorganize into proper namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Apr 3, 2024
1 parent c52d1e8 commit 91b331a
Show file tree
Hide file tree
Showing 45 changed files with 67 additions and 62 deletions.
2 changes: 1 addition & 1 deletion Osu.Patcher.Hook/Patches/BeatmapMirror/EnableOsuDirect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Other;
using Osu.Stubs.Online;
using Osu.Utils.Extensions;
using static System.Reflection.Emit.OpCodes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Framework;
using Osu.Stubs.GameModes;
using Osu.Stubs.GameModes.Play;
using Osu.Stubs.Graphics;
using Osu.Stubs.Graphics.Skinning;
using Osu.Stubs.Graphics.Sprites;
using Osu.Stubs.Wrappers;
using Osu.Stubs.XNA;

namespace Osu.Patcher.Hook.Patches.LivePerformance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Diagnostics;
using Osu.Performance;
using Osu.Stubs.GameModes;
using Osu.Stubs.Other;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameModes.Play;
using Osu.Stubs.GameplayElements.Beatmaps;
using Osu.Stubs.GameplayElements.Scoring;

namespace Osu.Patcher.Hook.Patches.LivePerformance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using Osu.Stubs.Framework;
using Osu.Stubs.Graphics.Sprites;

namespace Osu.Patcher.Hook.Patches.LivePerformance;

Expand Down
4 changes: 2 additions & 2 deletions Osu.Patcher.Hook/Patches/LivePerformance/TrackOnScoreHit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Performance;
using Osu.Stubs.Rulesets;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameModes.Play.Rulesets;
using Osu.Stubs.GameplayElements.Scoring;

namespace Osu.Patcher.Hook.Patches.LivePerformance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Rulesets;
using Osu.Stubs.GameModes.Play.Rulesets;

namespace Osu.Patcher.Hook.Patches.LivePerformance;

Expand Down
2 changes: 1 addition & 1 deletion Osu.Patcher.Hook/Patches/Misc/AllowPlayModeReload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Patcher.Hook.Patches.UI;
using Osu.Stubs.Other;
using Osu.Stubs.Root;
using Osu.Utils.Extensions;
using static System.Reflection.Emit.OpCodes;

Expand Down
4 changes: 2 additions & 2 deletions Osu.Patcher.Hook/Patches/Misc/FixDoubleSkipping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.GameModes;
using Osu.Stubs.Other;
using Osu.Stubs.GameModes.Play;
using Osu.Stubs.GameplayElements.Events;

namespace Osu.Patcher.Hook.Patches.Misc;

Expand Down
2 changes: 1 addition & 1 deletion Osu.Patcher.Hook/Patches/Misc/LogSoftErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Other;
using Osu.Stubs.Root;

namespace Osu.Patcher.Hook.Patches.Misc;

Expand Down
4 changes: 2 additions & 2 deletions Osu.Patcher.Hook/Patches/Mods/AudioPreview/ModAudioEffects.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Osu.Stubs.Audio;
using Osu.Stubs.Scoring;
using static Osu.Stubs.Other.Mods;
using Osu.Stubs.GameplayElements.Scoring;
using static Osu.Stubs.Root.Mods;

namespace Osu.Patcher.Hook.Patches.Mods.AudioPreview;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Threading.Tasks;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.SongSelect;
using Osu.Stubs.GameModes.Select;

namespace Osu.Patcher.Hook.Patches.Mods.AudioPreview;

Expand Down
4 changes: 2 additions & 2 deletions Osu.Patcher.Hook/Patches/Mods/SuddenDeathAutoRetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Rulesets;
using Osu.Stubs.GameModes.Play.Rulesets;
using static System.Reflection.Emit.OpCodes;
using static Osu.Stubs.Other.Mods;
using static Osu.Stubs.Root.Mods;

namespace Osu.Patcher.Hook.Patches.Mods;

Expand Down
2 changes: 1 addition & 1 deletion Osu.Patcher.Hook/Patches/UI/AllowOpenOptionsInGameplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Other;
using Osu.Stubs.GameModes.Options;
using Osu.Utils.Extensions;
using static System.Reflection.Emit.OpCodes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.SongSelect;
using Osu.Stubs.GameplayElements.Beatmaps;
using Osu.Utils.Extensions;
using static System.Reflection.Emit.OpCodes;

Expand Down
3 changes: 2 additions & 1 deletion Osu.Patcher.Hook/Patches/UI/RevertSortWhenNoGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using System.Reflection.Emit;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.GameModes.Select;
using Osu.Stubs.GameplayElements.Beatmaps;
using Osu.Stubs.Helpers;
using Osu.Stubs.SongSelect;
using Osu.Utils.Extensions;
using static System.Reflection.Emit.OpCodes;

Expand Down
2 changes: 1 addition & 1 deletion Osu.Patcher.Hook/Patches/UI/ShowModsInGameplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Reflection;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.GameModes;
using Osu.Stubs.GameModes.Play;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Patcher.Hook.Patches.UI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Other;
namespace Osu.Stubs.GameModes.Options;

/// <summary>
/// Original: <c>osu.GameModes.Options.Options</c>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameplayElements.Scoring;
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.GameModes;
namespace Osu.Stubs.GameModes.Play;

[PublicAPI]
public static class Player
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using JetBrains.Annotations;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameplayElements.Scoring.Processors;
using Osu.Utils.Lazy;

namespace Osu.Stubs.Rulesets;
namespace Osu.Stubs.GameModes.Play.Rulesets;

[PublicAPI]
public class IncreaseScoreType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameplayElements.Scoring;
using Osu.Utils.Extensions;
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Rulesets;
namespace Osu.Stubs.GameModes.Play.Rulesets;

[PublicAPI]
public static class Ruleset
Expand Down Expand Up @@ -128,6 +128,6 @@ public static class Ruleset
public static readonly LazyField<object?> ScoreDisplay = new(
"osu.GameModes.Play.Rulesets.Ruleset::ScoreDisplay",
() => Class.Reference.GetRuntimeFields()
.Single(field => field.FieldType == GameModes.ScoreDisplay.Class.Reference)
.Single(field => field.FieldType == Play.ScoreDisplay.Class.Reference)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.GameModes;
namespace Osu.Stubs.GameModes.Play;

[PublicAPI]
public static class ScoreDisplay
Expand Down Expand Up @@ -81,6 +81,6 @@ public static class ScoreDisplay
public static readonly LazyField<object> SpriteManager = new(
"osu.GameModes.Play.Components.ScoreDisplay::spriteManager",
() => Class.Reference.GetDeclaredFields()
.Single(field => field.FieldType == Graphics.SpriteManager.Class.Reference)
.Single(field => field.FieldType == Graphics.Sprites.SpriteManager.Class.Reference)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.SongSelect;
namespace Osu.Stubs.GameModes.Select;

/// <summary>
/// Original: <c>osu.GameModes.Select.ModSelection</c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.SongSelect;
namespace Osu.Stubs.GameModes.Select;

/// <summary>
/// Original: <c>osu.GameModes.Select.SongSelection</c>
Expand Down Expand Up @@ -57,7 +57,7 @@ public static class SongSelection
);

/// <summary>
/// Original: <c>beatmapTreeManager</c> of type <see cref="SongSelect.BeatmapTreeManager" />
/// Original: <c>beatmapTreeManager</c> of type <see cref="GameplayElements.Beatmaps.BeatmapTreeManager" />
/// b20240102.2: <c>#=zj0IgvXxTqseooUEFmQ==</c>
/// </summary>
[Stub]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Osu.Stubs.Scoring;
using Osu.Stubs.GameplayElements.Scoring;
using Osu.Utils;
using Osu.Utils.IL;
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Other;
namespace Osu.Stubs.GameplayElements.Beatmaps;

[PublicAPI]
public static class Beatmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.SongSelect;
namespace Osu.Stubs.GameplayElements.Beatmaps;

/// <summary>
/// Original: <c>osu.GameplayElements.Beatmaps.BeatmapTreeItem</c>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using JetBrains.Annotations;
using Osu.Stubs.GameModes.Select;
using Osu.Utils.Lazy;

namespace Osu.Stubs.SongSelect;
namespace Osu.Stubs.GameplayElements.Beatmaps;

/// <summary>
/// Original: <c>osu.GameplayElements.Beatmaps.BeatmapTreeManager</c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Other;
namespace Osu.Stubs.GameplayElements.Events;

/// <summary>
/// Original: <c>osu.GameplayElements.Events.EventManager</c>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Linq;
using HarmonyLib;
using JetBrains.Annotations;
using Osu.Stubs.Other;
using Osu.Stubs.Root;
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Scoring;
namespace Osu.Stubs.GameplayElements.Scoring;

[PublicAPI]
public class ModManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Linq;
using JetBrains.Annotations;
using Osu.Stubs.Rulesets;
using Osu.Stubs.GameModes.Play.Rulesets;
using Osu.Utils.Lazy;

namespace Osu.Stubs.Scoring;
namespace Osu.Stubs.GameplayElements.Scoring.Processors;

[PublicAPI]
public static class ScoreChange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Scoring;
namespace Osu.Stubs.GameplayElements.Scoring.Processors;

/// <summary>
/// Original: <c>osu.GameplayElements.Scoring.Processors.ScoreProcessor</c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Scoring;
namespace Osu.Stubs.GameplayElements.Scoring;

[PublicAPI]
public static class Score
Expand Down Expand Up @@ -70,7 +70,7 @@ public static class Score
"osu.GameplayElements.Scoring.Score::Beatmap",
() => Class.Reference
.GetRuntimeFields()
.Single(inst => inst.FieldType == Other.Beatmap.Class.Reference)
.Single(inst => inst.FieldType == Beatmaps.Beatmap.Class.Reference)
);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Graphics;
namespace Osu.Stubs.Graphics.Notifications;

/// <summary>
/// Original: <c>osu.Graphics.Notifications.NotificationManager</c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Graphics;
namespace Osu.Stubs.Graphics.Skinning;

[PublicAPI]
public static class SkinManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using JetBrains.Annotations;
using Osu.Utils.Lazy;

namespace Osu.Stubs.Graphics;
namespace Osu.Stubs.Graphics.Skinning;

/// <summary>
/// Most names are present because this class is <c>[Serializable]</c>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Osu.Utils.Lazy;
using static System.Reflection.Emit.OpCodes;

namespace Osu.Stubs.Graphics;
namespace Osu.Stubs.Graphics.Sprites;

[PublicAPI]
public static class SpriteManager
Expand Down
Loading

0 comments on commit 91b331a

Please sign in to comment.