feat(calculator): support generate PerformanceAttributes & DifficultyAttributes from JSON Schema (#59)
Prepare for custom rulesets. Schema Genetator: https://github.com/GooGuTeam/custom-rulesets/tree/main/CustomRulesetMetadataGenerator ```bash dotnet -- schemas path/to/rulesets -o schema.json ``` ```bash python scripts/generate_ruleset_attributes.py schema.json ```
This commit is contained in:
@@ -2,7 +2,7 @@ import abc
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from app.models.mods import APIMod
|
||||
from app.models.performance import BeatmapAttributes, PerformanceAttributes
|
||||
from app.models.performance import DifficultyAttributes, PerformanceAttributes
|
||||
from app.models.score import GameMode
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -33,5 +33,5 @@ class PerformanceCalculator(abc.ABC):
|
||||
@abc.abstractmethod
|
||||
async def calculate_difficulty(
|
||||
self, beatmap_raw: str, mods: list[APIMod] | None = None, gamemode: GameMode | None = None
|
||||
) -> BeatmapAttributes:
|
||||
) -> DifficultyAttributes:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user