1
0
mirror of synced 2025-01-31 12:13:49 +01:00

update bemapi to include music_rate and jubeat festo

This commit is contained in:
seth 2022-08-16 18:27:08 -05:00 committed by Jennifer Taylor
parent 4f6d48fe45
commit 83892aea75
4 changed files with 6 additions and 1 deletions

View File

@ -245,6 +245,7 @@ def lookup(protoversion: str, requestgame: str, requestversion: str) -> Dict[str
'6': VersionConstants.JUBEAT_PROP,
'7': VersionConstants.JUBEAT_QUBELL,
'8': VersionConstants.JUBEAT_CLAN,
'9': VersionConstants.JUBEAT_FESTO,
},
GameConstants.MUSECA: {
'1': VersionConstants.MUSECA,

View File

@ -89,6 +89,7 @@ class RecordsObject(BaseObject):
'status': status,
'combo': record.data.get_int('combo', -1),
'ghost': ghost,
'music_rate': record.data.get_int('music_rate'),
}
def __format_museca_record(self, record: Score) -> Dict[str, Any]:

View File

@ -150,6 +150,7 @@ class APIClient:
VersionConstants.JUBEAT_PROP: '6',
VersionConstants.JUBEAT_QUBELL: '7',
VersionConstants.JUBEAT_CLAN: '8',
VersionConstants.JUBEAT_FESTO: '9',
},
GameConstants.MUSECA: {
VersionConstants.MUSECA: '1',

View File

@ -139,7 +139,8 @@ class GlobalMusicData(BaseGlobalData):
{
'medal': status,
'combo': int(data.get('combo', -1)),
'ghost': [int(x) for x in data.get('ghost', [])]
'ghost': [int(x) for x in data.get('ghost', [])],
'music_rate': int(data.get('music_rate')),
},
)
@ -358,6 +359,7 @@ class GlobalMusicData(BaseGlobalData):
'ghost': oldscore.data.get('ghost') if oldscore.points > newscore.points else newscore.data.get('ghost'),
'combo': self.__max(oldscore.data['combo'], newscore.data['combo']),
'medal': self.__max(oldscore.data['medal'], newscore.data['medal']),
'music_rate': self.__max(oldscore.data['music_rate'], newscore.data['music_rate']),
},
)