Fix some typing error
This commit is contained in:
parent
ede06b3e68
commit
6273c16a3a
@ -292,7 +292,7 @@ class PopnMusicBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
||||
# We saved successfully
|
||||
break
|
||||
|
||||
def broadcast_score(self, userid: int, songid: int, chart: int, medal: int, points: int, combo: int, stats: Dict[str, int]) -> None:
|
||||
def broadcast_score(self, userid: UserID, songid: int, chart: int, medal: int, points: int, combo: int, stats: Dict[str, int]) -> None:
|
||||
# Generate scorecard
|
||||
profile = self.get_profile(userid)
|
||||
song = self.data.local.music.get_song(self.game, self.version, songid, chart)
|
||||
@ -324,13 +324,13 @@ class PopnMusicBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
||||
BroadcastConstants.SONG_NAME: song.name,
|
||||
BroadcastConstants.ARTIST_NAME: song.artist,
|
||||
BroadcastConstants.DIFFICULTY: card_chart,
|
||||
BroadcastConstants.SCORE: points,
|
||||
BroadcastConstants.SCORE: str(points),
|
||||
BroadcastConstants.MEDAL: card_medal,
|
||||
BroadcastConstants.COOLS: stats['cool'],
|
||||
BroadcastConstants.GREATS: stats['great'],
|
||||
BroadcastConstants.GOODS: stats['good'],
|
||||
BroadcastConstants.BADS: stats['bad'],
|
||||
BroadcastConstants.COMBO: combo,
|
||||
BroadcastConstants.COOLS: str(stats['cool']),
|
||||
BroadcastConstants.GREATS: str(stats['great']),
|
||||
BroadcastConstants.GOODS: str(stats['good']),
|
||||
BroadcastConstants.BADS: str(stats['bad']),
|
||||
BroadcastConstants.COMBO: str(combo),
|
||||
}
|
||||
|
||||
# Try to broadcast out the score to our webhook(s)
|
||||
|
@ -441,7 +441,7 @@ class PopnMusicEclale(PopnMusicBase):
|
||||
self.update_score(userid, songid, chart, points, medal, combo=combo, stats=stats)
|
||||
|
||||
if request.child_value('is_image_store') == 1:
|
||||
self.broadcast_score(userid, songid, chart, medal, combo, stats)
|
||||
self.broadcast_score(userid, songid, chart, medal, points, combo, stats)
|
||||
|
||||
return root
|
||||
|
||||
|
@ -693,7 +693,7 @@ class PopnMusicUsaNeko(PopnMusicBase):
|
||||
self.update_score(userid, songid, chart, points, medal, combo=combo, stats=stats)
|
||||
|
||||
if request.child_value('is_image_store') == 1:
|
||||
self.broadcast_score(userid, songid, chart, medal, combo, stats)
|
||||
self.broadcast_score(userid, songid, chart, medal, points, combo, stats)
|
||||
|
||||
return root
|
||||
|
||||
|
@ -18,7 +18,7 @@ class MetalGearArcadeFrontend(FrontendBase):
|
||||
super().__init__(data, config, cache)
|
||||
self.machines: Dict[int, str] = {}
|
||||
|
||||
def all_games(self) -> Iterator[Tuple[str, int, str]]:
|
||||
def all_games(self) -> Iterator[Tuple[GameConstants, int, str]]:
|
||||
yield from MetalGearArcadeFactory.all_games()
|
||||
|
||||
def __update_value(self, oldvalue: str, newvalue: bytes) -> str:
|
||||
|
Loading…
x
Reference in New Issue
Block a user