1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-07 23:07:01 +09:00
osu-tools/PerformanceCalculator/Program.cs
Bartłomiej Dach 8a681e11bc
Implement command for testing legacy score total conversion
Comes in handy when needing to quickly diagnose failures in score
importers without having to fabricate a replay or import data locally or
do other similar shenanigans.
2024-01-29 23:10:34 +01:00

49 lines
1.6 KiB
C#

// 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.Text;
using McMaster.Extensions.CommandLineUtils;
using osu.Framework.Logging;
using osu.Game.Beatmaps.Formats;
using osu.Game.Online;
using PerformanceCalculator.Difficulty;
using PerformanceCalculator.Leaderboard;
using PerformanceCalculator.Performance;
using PerformanceCalculator.Profile;
using PerformanceCalculator.Simulate;
namespace PerformanceCalculator
{
[Command("dotnet PerformanceCalculator.dll")]
[Subcommand(typeof(DifficultyCommand))]
[Subcommand(typeof(ModsCommand))]
[Subcommand(typeof(PerformanceListingCommand))]
[Subcommand(typeof(ProfileCommand))]
[Subcommand(typeof(SimulateListingCommand))]
[Subcommand(typeof(LeaderboardCommand))]
[Subcommand(typeof(LegacyScoreAttributesCommand))]
[Subcommand(typeof(LegacyScoreConversionCommand))]
[HelpOption("-?|-h|--help")]
public class Program
{
public static readonly EndpointConfiguration ENDPOINT_CONFIGURATION = new ProductionEndpointConfiguration();
public static void Main(string[] args)
{
Console.OutputEncoding = Encoding.UTF8;
Logger.Enabled = false;
LegacyDifficultyCalculatorBeatmapDecoder.Register();
CommandLineApplication.Execute<Program>(args);
}
public int OnExecute(CommandLineApplication app, IConsole console)
{
console.WriteLine("You must specify a subcommand.");
app.ShowHelp();
return 1;
}
}
}