Latest black changed some formatting, re-run it.
This commit is contained in:
parent
bf9bf16ddd
commit
eaf07ddf6a
@ -207,7 +207,7 @@ def lookup(protoversion: str, requestgame: str, requestversion: str) -> Dict[str
|
|||||||
|
|
||||||
# Figure out what games we support based on config, and map those.
|
# Figure out what games we support based on config, and map those.
|
||||||
gamemapping = {}
|
gamemapping = {}
|
||||||
for (gameid, constant) in [
|
for gameid, constant in [
|
||||||
("ddr", GameConstants.DDR),
|
("ddr", GameConstants.DDR),
|
||||||
("iidx", GameConstants.IIDX),
|
("iidx", GameConstants.IIDX),
|
||||||
("jubeat", GameConstants.JUBEAT),
|
("jubeat", GameConstants.JUBEAT),
|
||||||
|
@ -119,7 +119,7 @@ class ProfileObject(BaseObject):
|
|||||||
# Now, fetch the users, and filter out profiles belonging to orphaned users
|
# Now, fetch the users, and filter out profiles belonging to orphaned users
|
||||||
retval: List[Dict[str, Any]] = []
|
retval: List[Dict[str, Any]] = []
|
||||||
id_to_cards: Dict[UserID, List[str]] = {}
|
id_to_cards: Dict[UserID, List[str]] = {}
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if userid not in id_to_cards:
|
if userid not in id_to_cards:
|
||||||
cards = self.data.local.user.get_cards(userid)
|
cards = self.data.local.user.get_cards(userid)
|
||||||
if len(cards) == 0:
|
if len(cards) == 0:
|
||||||
|
@ -306,7 +306,7 @@ class RecordsObject(BaseObject):
|
|||||||
# Now, fetch the users, and filter out scores belonging to orphaned users
|
# Now, fetch the users, and filter out scores belonging to orphaned users
|
||||||
id_to_cards: Dict[UserID, List[str]] = {}
|
id_to_cards: Dict[UserID, List[str]] = {}
|
||||||
retval: List[Dict[str, Any]] = []
|
retval: List[Dict[str, Any]] = []
|
||||||
for (userid, record) in records:
|
for userid, record in records:
|
||||||
# Postfilter for queries that can't filter. This will save on data transferred.
|
# Postfilter for queries that can't filter. This will save on data transferred.
|
||||||
if since is not None:
|
if since is not None:
|
||||||
if record.update < since:
|
if record.update < since:
|
||||||
|
@ -182,7 +182,7 @@ class StatisticsObject(BaseObject):
|
|||||||
) -> List[Dict[str, Any]]:
|
) -> List[Dict[str, Any]]:
|
||||||
stats: Dict[UserID, Dict[int, Dict[int, Dict[str, int]]]] = {}
|
stats: Dict[UserID, Dict[int, Dict[int, Dict[str, int]]]] = {}
|
||||||
|
|
||||||
for (userid, attempt) in attempts:
|
for userid, attempt in attempts:
|
||||||
if userid not in stats:
|
if userid not in stats:
|
||||||
stats[userid] = {}
|
stats[userid] = {}
|
||||||
if attempt.id not in stats[userid]:
|
if attempt.id not in stats[userid]:
|
||||||
|
@ -21,7 +21,6 @@ class TheStarBishiBashi(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
BishiBashiBase,
|
BishiBashiBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "The★BishiBashi"
|
name: str = "The★BishiBashi"
|
||||||
version: int = VersionConstants.BISHI_BASHI_TSBB
|
version: int = VersionConstants.BISHI_BASHI_TSBB
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class BishiBashiFactory(Factory):
|
class BishiBashiFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
TheStarBishiBashi,
|
TheStarBishiBashi,
|
||||||
]
|
]
|
||||||
@ -25,7 +24,6 @@ class BishiBashiFactory(Factory):
|
|||||||
model: Model,
|
model: Model,
|
||||||
parentmodel: Optional[Model] = None,
|
parentmodel: Optional[Model] = None,
|
||||||
) -> Optional[Base]:
|
) -> Optional[Base]:
|
||||||
|
|
||||||
if model.gamecode == "IBB":
|
if model.gamecode == "IBB":
|
||||||
return TheStarBishiBashi(data, config, model)
|
return TheStarBishiBashi(data, config, model)
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ class PASELIHandler(Base):
|
|||||||
)
|
)
|
||||||
topic.add_child(Node.string("sumto", Time.format(this_month, date_format)))
|
topic.add_child(Node.string("sumto", Time.format(this_month, date_format)))
|
||||||
|
|
||||||
for (start, end) in [(month_before, last_month), (last_month, this_month)]:
|
for start, end in [(month_before, last_month), (last_month, this_month)]:
|
||||||
year, month, _ = Time.date_from_timestamp(start)
|
year, month, _ = Time.date_from_timestamp(start)
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
|
@ -58,7 +58,7 @@ class DDRGameHiscoreHandler(DDRBase):
|
|||||||
|
|
||||||
sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
||||||
missing_profiles = []
|
missing_profiles = []
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
if score.id not in sortedrecords:
|
if score.id not in sortedrecords:
|
||||||
sortedrecords[score.id] = {}
|
sortedrecords[score.id] = {}
|
||||||
sortedrecords[score.id][score.chart] = (userid, score)
|
sortedrecords[score.id][score.chart] = (userid, score)
|
||||||
@ -124,7 +124,7 @@ class DDRGameAreaHiscoreHandler(DDRBase):
|
|||||||
# to think about how to change this knowing that we only pulled
|
# to think about how to change this knowing that we only pulled
|
||||||
# up area records.
|
# up area records.
|
||||||
area_records: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
area_records: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
if score.id not in area_records:
|
if score.id not in area_records:
|
||||||
area_records[score.id] = {}
|
area_records[score.id] = {}
|
||||||
area_records[score.id][score.chart] = (userid, score)
|
area_records[score.id][score.chart] = (userid, score)
|
||||||
|
@ -52,7 +52,6 @@ class DDR2013(
|
|||||||
DDRGameTraceHandler,
|
DDRGameTraceHandler,
|
||||||
DDRBase,
|
DDRBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 2013"
|
name: str = "DanceDanceRevolution 2013"
|
||||||
version: int = VersionConstants.DDR_2013
|
version: int = VersionConstants.DDR_2013
|
||||||
|
|
||||||
@ -176,7 +175,7 @@ class DDR2013(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS
|
self.game, self.music_version, self.GAME_MAX_SONGS
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
||||||
|
@ -46,7 +46,6 @@ class DDR2014(
|
|||||||
DDRGameTaxInfoHandler,
|
DDRGameTaxInfoHandler,
|
||||||
DDRBase,
|
DDRBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 2014"
|
name: str = "DanceDanceRevolution 2014"
|
||||||
version: int = VersionConstants.DDR_2014
|
version: int = VersionConstants.DDR_2014
|
||||||
|
|
||||||
@ -171,7 +170,7 @@ class DDR2014(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS, 30
|
self.game, self.music_version, self.GAME_MAX_SONGS, 30
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music_monthly", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music_monthly", counts_by_reflink))
|
||||||
@ -181,7 +180,7 @@ class DDR2014(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS, 7
|
self.game, self.music_version, self.GAME_MAX_SONGS, 7
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music_weekly", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music_weekly", counts_by_reflink))
|
||||||
@ -191,7 +190,7 @@ class DDR2014(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS, 1
|
self.game, self.music_version, self.GAME_MAX_SONGS, 1
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music_daily", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music_daily", counts_by_reflink))
|
||||||
|
@ -9,7 +9,6 @@ from bemani.common import VersionConstants
|
|||||||
class DDRA20(
|
class DDRA20(
|
||||||
DDRBase,
|
DDRBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution A20"
|
name: str = "DanceDanceRevolution A20"
|
||||||
version: int = VersionConstants.DDR_A20
|
version: int = VersionConstants.DDR_A20
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ class DDRAce(
|
|||||||
DDRBase,
|
DDRBase,
|
||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution A"
|
name: str = "DanceDanceRevolution A"
|
||||||
version: int = VersionConstants.DDR_ACE
|
version: int = VersionConstants.DDR_ACE
|
||||||
|
|
||||||
@ -623,7 +622,7 @@ class DDRAce(
|
|||||||
missing_users = [
|
missing_users = [
|
||||||
userid for (userid, _) in scores if userid not in profiles_by_userid
|
userid for (userid, _) in scores if userid not in profiles_by_userid
|
||||||
]
|
]
|
||||||
for (userid, profile) in self.get_any_profiles(missing_users):
|
for userid, profile in self.get_any_profiles(missing_users):
|
||||||
profiles_by_userid[userid] = profile
|
profiles_by_userid[userid] = profile
|
||||||
|
|
||||||
for userid, score in scores:
|
for userid, score in scores:
|
||||||
|
@ -42,7 +42,6 @@ class DDRX2(
|
|||||||
DDRGameTraceHandler,
|
DDRGameTraceHandler,
|
||||||
DDRBase,
|
DDRBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution X2"
|
name: str = "DanceDanceRevolution X2"
|
||||||
version: int = VersionConstants.DDR_X2
|
version: int = VersionConstants.DDR_X2
|
||||||
|
|
||||||
@ -161,7 +160,7 @@ class DDRX2(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS
|
self.game, self.music_version, self.GAME_MAX_SONGS
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
||||||
@ -176,7 +175,7 @@ class DDRX2(
|
|||||||
|
|
||||||
sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
sortedrecords: Dict[int, Dict[int, Tuple[UserID, Score]]] = {}
|
||||||
missing_profiles = []
|
missing_profiles = []
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
if score.id not in sortedrecords:
|
if score.id not in sortedrecords:
|
||||||
sortedrecords[score.id] = {}
|
sortedrecords[score.id] = {}
|
||||||
sortedrecords[score.id][score.chart] = (userid, score)
|
sortedrecords[score.id][score.chart] = (userid, score)
|
||||||
|
@ -48,7 +48,6 @@ class DDRX3(
|
|||||||
DDRGameTraceHandler,
|
DDRGameTraceHandler,
|
||||||
DDRBase,
|
DDRBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution X3 VS 2ndMIX"
|
name: str = "DanceDanceRevolution X3 VS 2ndMIX"
|
||||||
version: int = VersionConstants.DDR_X3_VS_2NDMIX
|
version: int = VersionConstants.DDR_X3_VS_2NDMIX
|
||||||
|
|
||||||
@ -170,7 +169,7 @@ class DDRX3(
|
|||||||
self.game, self.music_version, self.GAME_MAX_SONGS
|
self.game, self.music_version, self.GAME_MAX_SONGS
|
||||||
)
|
)
|
||||||
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
counts_by_reflink = [0] * self.GAME_MAX_SONGS
|
||||||
for (reflink, plays) in hit_chart:
|
for reflink, plays in hit_chart:
|
||||||
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
if reflink >= 0 and reflink < self.GAME_MAX_SONGS:
|
||||||
counts_by_reflink[reflink] = plays
|
counts_by_reflink[reflink] = plays
|
||||||
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
game.add_child(Node.u32_array("cnt_music", counts_by_reflink))
|
||||||
|
@ -25,7 +25,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class DDRFactory(Factory):
|
class DDRFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
DDR1stMix,
|
DDR1stMix,
|
||||||
DDR2ndMix,
|
DDR2ndMix,
|
||||||
|
@ -6,7 +6,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class DDRX(DDRBase):
|
class DDRX(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution X"
|
name: str = "DanceDanceRevolution X"
|
||||||
version: int = VersionConstants.DDR_X
|
version: int = VersionConstants.DDR_X
|
||||||
|
|
||||||
@ -15,7 +14,6 @@ class DDRX(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDRSuperNova2(DDRBase):
|
class DDRSuperNova2(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution SuperNova 2"
|
name: str = "DanceDanceRevolution SuperNova 2"
|
||||||
version: int = VersionConstants.DDR_SUPERNOVA_2
|
version: int = VersionConstants.DDR_SUPERNOVA_2
|
||||||
|
|
||||||
@ -24,7 +22,6 @@ class DDRSuperNova2(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDRSuperNova(DDRBase):
|
class DDRSuperNova(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution SuperNova"
|
name: str = "DanceDanceRevolution SuperNova"
|
||||||
version: int = VersionConstants.DDR_SUPERNOVA
|
version: int = VersionConstants.DDR_SUPERNOVA
|
||||||
|
|
||||||
@ -33,7 +30,6 @@ class DDRSuperNova(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDRExtreme(DDRBase):
|
class DDRExtreme(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution Extreme"
|
name: str = "DanceDanceRevolution Extreme"
|
||||||
version: int = VersionConstants.DDR_EXTREME
|
version: int = VersionConstants.DDR_EXTREME
|
||||||
|
|
||||||
@ -42,7 +38,6 @@ class DDRExtreme(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR7thMix(DDRBase):
|
class DDR7thMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 7thMix"
|
name: str = "DanceDanceRevolution 7thMix"
|
||||||
version: int = VersionConstants.DDR_7THMIX
|
version: int = VersionConstants.DDR_7THMIX
|
||||||
|
|
||||||
@ -51,7 +46,6 @@ class DDR7thMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR6thMix(DDRBase):
|
class DDR6thMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 6thMix"
|
name: str = "DanceDanceRevolution 6thMix"
|
||||||
version: int = VersionConstants.DDR_6THMIX
|
version: int = VersionConstants.DDR_6THMIX
|
||||||
|
|
||||||
@ -60,7 +54,6 @@ class DDR6thMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR5thMix(DDRBase):
|
class DDR5thMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 5thMix"
|
name: str = "DanceDanceRevolution 5thMix"
|
||||||
version: int = VersionConstants.DDR_5THMIX
|
version: int = VersionConstants.DDR_5THMIX
|
||||||
|
|
||||||
@ -69,7 +62,6 @@ class DDR5thMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR4thMix(DDRBase):
|
class DDR4thMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 4thMix"
|
name: str = "DanceDanceRevolution 4thMix"
|
||||||
version: int = VersionConstants.DDR_4THMIX
|
version: int = VersionConstants.DDR_4THMIX
|
||||||
|
|
||||||
@ -78,7 +70,6 @@ class DDR4thMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR3rdMix(DDRBase):
|
class DDR3rdMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 3rdMix"
|
name: str = "DanceDanceRevolution 3rdMix"
|
||||||
version: int = VersionConstants.DDR_3RDMIX
|
version: int = VersionConstants.DDR_3RDMIX
|
||||||
|
|
||||||
@ -87,7 +78,6 @@ class DDR3rdMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR2ndMix(DDRBase):
|
class DDR2ndMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 2ndMix"
|
name: str = "DanceDanceRevolution 2ndMix"
|
||||||
version: int = VersionConstants.DDR_2NDMIX
|
version: int = VersionConstants.DDR_2NDMIX
|
||||||
|
|
||||||
@ -96,6 +86,5 @@ class DDR2ndMix(DDRBase):
|
|||||||
|
|
||||||
|
|
||||||
class DDR1stMix(DDRBase):
|
class DDR1stMix(DDRBase):
|
||||||
|
|
||||||
name: str = "DanceDanceRevolution 1stMix"
|
name: str = "DanceDanceRevolution 1stMix"
|
||||||
version: int = VersionConstants.DDR_1STMIX
|
version: int = VersionConstants.DDR_1STMIX
|
||||||
|
@ -237,7 +237,7 @@ class IIDXBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
|||||||
)
|
)
|
||||||
|
|
||||||
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
||||||
for (_, attempt) in all_attempts:
|
for _, attempt in all_attempts:
|
||||||
if attempt.data.get_int("clear_status") == self.CLEAR_STATUS_NO_PLAY:
|
if attempt.data.get_int("clear_status") == self.CLEAR_STATUS_NO_PLAY:
|
||||||
# This attempt was outside of the clear infra, so don't bother with it.
|
# This attempt was outside of the clear infra, so don't bother with it.
|
||||||
continue
|
continue
|
||||||
|
@ -7,7 +7,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class IIDXBistrover(IIDXBase):
|
class IIDXBistrover(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX BISTROVER"
|
name: str = "Beatmania IIDX BISTROVER"
|
||||||
version: int = VersionConstants.IIDX_BISTROVER
|
version: int = VersionConstants.IIDX_BISTROVER
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXCannonBallers(IIDXCourse, IIDXBase):
|
class IIDXCannonBallers(IIDXCourse, IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX CANNON BALLERS"
|
name: str = "Beatmania IIDX CANNON BALLERS"
|
||||||
version: int = VersionConstants.IIDX_CANNON_BALLERS
|
version: int = VersionConstants.IIDX_CANNON_BALLERS
|
||||||
|
|
||||||
@ -844,7 +843,7 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -21,7 +21,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXCopula(IIDXCourse, IIDXBase):
|
class IIDXCopula(IIDXCourse, IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX copula"
|
name: str = "Beatmania IIDX copula"
|
||||||
version: int = VersionConstants.IIDX_COPULA
|
version: int = VersionConstants.IIDX_COPULA
|
||||||
|
|
||||||
@ -721,7 +720,7 @@ class IIDXCopula(IIDXCourse, IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -8,7 +8,6 @@ from bemani.data import UserID
|
|||||||
|
|
||||||
|
|
||||||
class IIDXCourse(IIDXBase):
|
class IIDXCourse(IIDXBase):
|
||||||
|
|
||||||
COURSE_TYPE_SECRET: Final[str] = "secret_course"
|
COURSE_TYPE_SECRET: Final[str] = "secret_course"
|
||||||
COURSE_TYPE_INTERNET_RANKING: Final[str] = "ir_course"
|
COURSE_TYPE_INTERNET_RANKING: Final[str] = "ir_course"
|
||||||
COURSE_TYPE_CLASSIC: Final[str] = "classic_course"
|
COURSE_TYPE_CLASSIC: Final[str] = "classic_course"
|
||||||
|
@ -36,7 +36,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class IIDXFactory(Factory):
|
class IIDXFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
IIDX1stStyle,
|
IIDX1stStyle,
|
||||||
IIDX2ndStyle,
|
IIDX2ndStyle,
|
||||||
|
@ -7,7 +7,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class IIDXHeroicVerse(IIDXBase):
|
class IIDXHeroicVerse(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX HEROIC VERSE"
|
name: str = "Beatmania IIDX HEROIC VERSE"
|
||||||
version: int = VersionConstants.IIDX_HEROIC_VERSE
|
version: int = VersionConstants.IIDX_HEROIC_VERSE
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXPendual(IIDXCourse, IIDXBase):
|
class IIDXPendual(IIDXCourse, IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX PENDUAL"
|
name: str = "Beatmania IIDX PENDUAL"
|
||||||
version: int = VersionConstants.IIDX_PENDUAL
|
version: int = VersionConstants.IIDX_PENDUAL
|
||||||
|
|
||||||
@ -724,7 +723,7 @@ class IIDXPendual(IIDXCourse, IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
@ -1301,7 +1300,7 @@ class IIDXPendual(IIDXCourse, IIDXBase):
|
|||||||
|
|
||||||
# Ranking details in title screen
|
# Ranking details in title screen
|
||||||
rankingcharts = []
|
rankingcharts = []
|
||||||
for (mid, _plays) in self.data.local.music.get_hit_chart(
|
for mid, _plays in self.data.local.music.get_hit_chart(
|
||||||
self.game, self.music_version, 20
|
self.game, self.music_version, 20
|
||||||
):
|
):
|
||||||
rankingcharts.append(mid)
|
rankingcharts.append(mid)
|
||||||
|
@ -22,7 +22,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXRootage(IIDXCourse, IIDXBase):
|
class IIDXRootage(IIDXCourse, IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX ROOTAGE"
|
name: str = "Beatmania IIDX ROOTAGE"
|
||||||
version: int = VersionConstants.IIDX_ROOTAGE
|
version: int = VersionConstants.IIDX_ROOTAGE
|
||||||
|
|
||||||
@ -698,7 +697,7 @@ class IIDXRootage(IIDXCourse, IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -22,7 +22,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXSinobuz(IIDXCourse, IIDXBase):
|
class IIDXSinobuz(IIDXCourse, IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX SINOBUZ"
|
name: str = "Beatmania IIDX SINOBUZ"
|
||||||
version: int = VersionConstants.IIDX_SINOBUZ
|
version: int = VersionConstants.IIDX_SINOBUZ
|
||||||
|
|
||||||
@ -845,7 +844,7 @@ class IIDXSinobuz(IIDXCourse, IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -20,7 +20,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXSpada(IIDXBase):
|
class IIDXSpada(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX SPADA"
|
name: str = "Beatmania IIDX SPADA"
|
||||||
version: int = VersionConstants.IIDX_SPADA
|
version: int = VersionConstants.IIDX_SPADA
|
||||||
|
|
||||||
@ -655,7 +654,7 @@ class IIDXSpada(IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -6,13 +6,11 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class IIDX1stStyle(IIDXBase):
|
class IIDX1stStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 1st style & substream"
|
name: str = "Beatmania IIDX 1st style & substream"
|
||||||
version: int = VersionConstants.IIDX
|
version: int = VersionConstants.IIDX
|
||||||
|
|
||||||
|
|
||||||
class IIDX2ndStyle(IIDXBase):
|
class IIDX2ndStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 2nd style"
|
name: str = "Beatmania IIDX 2nd style"
|
||||||
version: int = VersionConstants.IIDX_2ND_STYLE
|
version: int = VersionConstants.IIDX_2ND_STYLE
|
||||||
|
|
||||||
@ -21,7 +19,6 @@ class IIDX2ndStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX3rdStyle(IIDXBase):
|
class IIDX3rdStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 3rd style"
|
name: str = "Beatmania IIDX 3rd style"
|
||||||
version: int = VersionConstants.IIDX_3RD_STYLE
|
version: int = VersionConstants.IIDX_3RD_STYLE
|
||||||
|
|
||||||
@ -30,7 +27,6 @@ class IIDX3rdStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX4thStyle(IIDXBase):
|
class IIDX4thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 4th style"
|
name: str = "Beatmania IIDX 4th style"
|
||||||
version: int = VersionConstants.IIDX_4TH_STYLE
|
version: int = VersionConstants.IIDX_4TH_STYLE
|
||||||
|
|
||||||
@ -39,7 +35,6 @@ class IIDX4thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX5thStyle(IIDXBase):
|
class IIDX5thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 5th style"
|
name: str = "Beatmania IIDX 5th style"
|
||||||
version: int = VersionConstants.IIDX_5TH_STYLE
|
version: int = VersionConstants.IIDX_5TH_STYLE
|
||||||
|
|
||||||
@ -48,7 +43,6 @@ class IIDX5thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX6thStyle(IIDXBase):
|
class IIDX6thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 6th style"
|
name: str = "Beatmania IIDX 6th style"
|
||||||
version: int = VersionConstants.IIDX_6TH_STYLE
|
version: int = VersionConstants.IIDX_6TH_STYLE
|
||||||
|
|
||||||
@ -57,7 +51,6 @@ class IIDX6thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX7thStyle(IIDXBase):
|
class IIDX7thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 7th style"
|
name: str = "Beatmania IIDX 7th style"
|
||||||
version: int = VersionConstants.IIDX_7TH_STYLE
|
version: int = VersionConstants.IIDX_7TH_STYLE
|
||||||
|
|
||||||
@ -66,7 +59,6 @@ class IIDX7thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX8thStyle(IIDXBase):
|
class IIDX8thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 8th style"
|
name: str = "Beatmania IIDX 8th style"
|
||||||
version: int = VersionConstants.IIDX_8TH_STYLE
|
version: int = VersionConstants.IIDX_8TH_STYLE
|
||||||
|
|
||||||
@ -75,7 +67,6 @@ class IIDX8thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX9thStyle(IIDXBase):
|
class IIDX9thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 9th style"
|
name: str = "Beatmania IIDX 9th style"
|
||||||
version: int = VersionConstants.IIDX_9TH_STYLE
|
version: int = VersionConstants.IIDX_9TH_STYLE
|
||||||
|
|
||||||
@ -84,7 +75,6 @@ class IIDX9thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDX10thStyle(IIDXBase):
|
class IIDX10thStyle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX 10th style"
|
name: str = "Beatmania IIDX 10th style"
|
||||||
version: int = VersionConstants.IIDX_10TH_STYLE
|
version: int = VersionConstants.IIDX_10TH_STYLE
|
||||||
|
|
||||||
@ -93,7 +83,6 @@ class IIDX10thStyle(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXRed(IIDXBase):
|
class IIDXRed(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX RED"
|
name: str = "Beatmania IIDX RED"
|
||||||
version: int = VersionConstants.IIDX_RED
|
version: int = VersionConstants.IIDX_RED
|
||||||
|
|
||||||
@ -102,7 +91,6 @@ class IIDXRed(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXHappySky(IIDXBase):
|
class IIDXHappySky(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX HAPPY SKY"
|
name: str = "Beatmania IIDX HAPPY SKY"
|
||||||
version: int = VersionConstants.IIDX_HAPPY_SKY
|
version: int = VersionConstants.IIDX_HAPPY_SKY
|
||||||
|
|
||||||
@ -111,7 +99,6 @@ class IIDXHappySky(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXDistorted(IIDXBase):
|
class IIDXDistorted(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX DistorteD"
|
name: str = "Beatmania IIDX DistorteD"
|
||||||
version: int = VersionConstants.IIDX_DISTORTED
|
version: int = VersionConstants.IIDX_DISTORTED
|
||||||
|
|
||||||
@ -120,7 +107,6 @@ class IIDXDistorted(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXGold(IIDXBase):
|
class IIDXGold(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX GOLD"
|
name: str = "Beatmania IIDX GOLD"
|
||||||
version: int = VersionConstants.IIDX_GOLD
|
version: int = VersionConstants.IIDX_GOLD
|
||||||
|
|
||||||
@ -129,7 +115,6 @@ class IIDXGold(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXDJTroopers(IIDXBase):
|
class IIDXDJTroopers(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX DJ TROOPERS"
|
name: str = "Beatmania IIDX DJ TROOPERS"
|
||||||
version: int = VersionConstants.IIDX_DJ_TROOPERS
|
version: int = VersionConstants.IIDX_DJ_TROOPERS
|
||||||
|
|
||||||
@ -138,7 +123,6 @@ class IIDXDJTroopers(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXEmpress(IIDXBase):
|
class IIDXEmpress(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX EMPRESS"
|
name: str = "Beatmania IIDX EMPRESS"
|
||||||
version: int = VersionConstants.IIDX_EMPRESS
|
version: int = VersionConstants.IIDX_EMPRESS
|
||||||
|
|
||||||
@ -147,7 +131,6 @@ class IIDXEmpress(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXSirius(IIDXBase):
|
class IIDXSirius(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX SIRIUS"
|
name: str = "Beatmania IIDX SIRIUS"
|
||||||
version: int = VersionConstants.IIDX_SIRIUS
|
version: int = VersionConstants.IIDX_SIRIUS
|
||||||
|
|
||||||
@ -156,7 +139,6 @@ class IIDXSirius(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXResortAnthem(IIDXBase):
|
class IIDXResortAnthem(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX Resort Anthem"
|
name: str = "Beatmania IIDX Resort Anthem"
|
||||||
version: int = VersionConstants.IIDX_RESORT_ANTHEM
|
version: int = VersionConstants.IIDX_RESORT_ANTHEM
|
||||||
|
|
||||||
@ -165,7 +147,6 @@ class IIDXResortAnthem(IIDXBase):
|
|||||||
|
|
||||||
|
|
||||||
class IIDXLincle(IIDXBase):
|
class IIDXLincle(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX Lincle"
|
name: str = "Beatmania IIDX Lincle"
|
||||||
version: int = VersionConstants.IIDX_LINCLE
|
version: int = VersionConstants.IIDX_LINCLE
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class IIDXTricoro(IIDXBase):
|
class IIDXTricoro(IIDXBase):
|
||||||
|
|
||||||
name: str = "Beatmania IIDX Tricoro"
|
name: str = "Beatmania IIDX Tricoro"
|
||||||
version: int = VersionConstants.IIDX_TRICORO
|
version: int = VersionConstants.IIDX_TRICORO
|
||||||
|
|
||||||
@ -647,7 +646,7 @@ class IIDXTricoro(IIDXBase):
|
|||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
missing_players = [uid for (uid, _) in all_scores if uid not in all_players]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
all_players[uid] = prof
|
all_players[uid] = prof
|
||||||
|
|
||||||
if not global_scores:
|
if not global_scores:
|
||||||
|
@ -7,7 +7,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class JubeatAvenue(JubeatBase):
|
class JubeatAvenue(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Avenue"
|
name: str = "Jubeat Avenue"
|
||||||
version: int = VersionConstants.JUBEAT_AVENUE
|
version: int = VersionConstants.JUBEAT_AVENUE
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ class JubeatClan(
|
|||||||
JubeatLoggerReportHandler,
|
JubeatLoggerReportHandler,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Clan"
|
name: str = "Jubeat Clan"
|
||||||
version: int = VersionConstants.JUBEAT_CLAN
|
version: int = VersionConstants.JUBEAT_CLAN
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ from bemani.backend.jubeat.base import JubeatBase
|
|||||||
|
|
||||||
|
|
||||||
class JubeatCourse(JubeatBase):
|
class JubeatCourse(JubeatBase):
|
||||||
|
|
||||||
COURSE_RATING_FAILED: Final[int] = 100
|
COURSE_RATING_FAILED: Final[int] = 100
|
||||||
COURSE_RATING_BRONZE: Final[int] = 200
|
COURSE_RATING_BRONZE: Final[int] = 200
|
||||||
COURSE_RATING_SILVER: Final[int] = 300
|
COURSE_RATING_SILVER: Final[int] = 300
|
||||||
|
@ -22,7 +22,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class JubeatFactory(Factory):
|
class JubeatFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
Jubeat,
|
Jubeat,
|
||||||
JubeatRipples,
|
JubeatRipples,
|
||||||
|
@ -29,7 +29,6 @@ class JubeatFesto(
|
|||||||
JubeatLoggerReportHandler,
|
JubeatLoggerReportHandler,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Festo"
|
name: str = "Jubeat Festo"
|
||||||
version: int = VersionConstants.JUBEAT_FESTO
|
version: int = VersionConstants.JUBEAT_FESTO
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ class JubeatProp(
|
|||||||
JubeatCourse,
|
JubeatCourse,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Prop"
|
name: str = "Jubeat Prop"
|
||||||
version: int = VersionConstants.JUBEAT_PROP
|
version: int = VersionConstants.JUBEAT_PROP
|
||||||
|
|
||||||
@ -1621,7 +1620,6 @@ class JubeatProp(
|
|||||||
def format_scores(
|
def format_scores(
|
||||||
self, userid: UserID, profile: Profile, scores: List[Score]
|
self, userid: UserID, profile: Profile, scores: List[Score]
|
||||||
) -> Node:
|
) -> Node:
|
||||||
|
|
||||||
root = Node.void("gametop")
|
root = Node.void("gametop")
|
||||||
datanode = Node.void("data")
|
datanode = Node.void("data")
|
||||||
root.add_child(datanode)
|
root.add_child(datanode)
|
||||||
|
@ -29,7 +29,6 @@ class JubeatQubell(
|
|||||||
JubeatLoggerReportHandler,
|
JubeatLoggerReportHandler,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Qubell"
|
name: str = "Jubeat Qubell"
|
||||||
version: int = VersionConstants.JUBEAT_QUBELL
|
version: int = VersionConstants.JUBEAT_QUBELL
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ class JubeatSaucer(
|
|||||||
JubeatLoggerReportHandler,
|
JubeatLoggerReportHandler,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Saucer"
|
name: str = "Jubeat Saucer"
|
||||||
version: int = VersionConstants.JUBEAT_SAUCER
|
version: int = VersionConstants.JUBEAT_SAUCER
|
||||||
|
|
||||||
@ -905,7 +904,6 @@ class JubeatSaucer(
|
|||||||
def format_scores(
|
def format_scores(
|
||||||
self, userid: UserID, profile: Profile, scores: List[Score]
|
self, userid: UserID, profile: Profile, scores: List[Score]
|
||||||
) -> Node:
|
) -> Node:
|
||||||
|
|
||||||
root = Node.void("gametop")
|
root = Node.void("gametop")
|
||||||
datanode = Node.void("data")
|
datanode = Node.void("data")
|
||||||
root.add_child(datanode)
|
root.add_child(datanode)
|
||||||
|
@ -30,7 +30,6 @@ class JubeatSaucerFulfill(
|
|||||||
JubeatCourse,
|
JubeatCourse,
|
||||||
JubeatBase,
|
JubeatBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Jubeat Saucer Fulfill"
|
name: str = "Jubeat Saucer Fulfill"
|
||||||
version: int = VersionConstants.JUBEAT_SAUCER_FULFILL
|
version: int = VersionConstants.JUBEAT_SAUCER_FULFILL
|
||||||
|
|
||||||
@ -1018,7 +1017,6 @@ class JubeatSaucerFulfill(
|
|||||||
def format_scores(
|
def format_scores(
|
||||||
self, userid: UserID, profile: Profile, scores: List[Score]
|
self, userid: UserID, profile: Profile, scores: List[Score]
|
||||||
) -> Node:
|
) -> Node:
|
||||||
|
|
||||||
root = Node.void("gametop")
|
root = Node.void("gametop")
|
||||||
datanode = Node.void("data")
|
datanode = Node.void("data")
|
||||||
root.add_child(datanode)
|
root.add_child(datanode)
|
||||||
|
@ -6,13 +6,11 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class Jubeat(JubeatBase):
|
class Jubeat(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat"
|
name: str = "Jubeat"
|
||||||
version: int = VersionConstants.JUBEAT
|
version: int = VersionConstants.JUBEAT
|
||||||
|
|
||||||
|
|
||||||
class JubeatRipples(JubeatBase):
|
class JubeatRipples(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Ripples"
|
name: str = "Jubeat Ripples"
|
||||||
version: int = VersionConstants.JUBEAT_RIPPLES
|
version: int = VersionConstants.JUBEAT_RIPPLES
|
||||||
|
|
||||||
@ -21,7 +19,6 @@ class JubeatRipples(JubeatBase):
|
|||||||
|
|
||||||
|
|
||||||
class JubeatRipplesAppend(JubeatBase):
|
class JubeatRipplesAppend(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Ripples Append"
|
name: str = "Jubeat Ripples Append"
|
||||||
version: int = VersionConstants.JUBEAT_RIPPLES_APPEND
|
version: int = VersionConstants.JUBEAT_RIPPLES_APPEND
|
||||||
|
|
||||||
@ -30,7 +27,6 @@ class JubeatRipplesAppend(JubeatBase):
|
|||||||
|
|
||||||
|
|
||||||
class JubeatKnit(JubeatBase):
|
class JubeatKnit(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Knit"
|
name: str = "Jubeat Knit"
|
||||||
version: int = VersionConstants.JUBEAT_KNIT
|
version: int = VersionConstants.JUBEAT_KNIT
|
||||||
|
|
||||||
@ -39,7 +35,6 @@ class JubeatKnit(JubeatBase):
|
|||||||
|
|
||||||
|
|
||||||
class JubeatKnitAppend(JubeatBase):
|
class JubeatKnitAppend(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Knit Append"
|
name: str = "Jubeat Knit Append"
|
||||||
version: int = VersionConstants.JUBEAT_KNIT_APPEND
|
version: int = VersionConstants.JUBEAT_KNIT_APPEND
|
||||||
|
|
||||||
@ -48,7 +43,6 @@ class JubeatKnitAppend(JubeatBase):
|
|||||||
|
|
||||||
|
|
||||||
class JubeatCopious(JubeatBase):
|
class JubeatCopious(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Copious"
|
name: str = "Jubeat Copious"
|
||||||
version: int = VersionConstants.JUBEAT_COPIOUS
|
version: int = VersionConstants.JUBEAT_COPIOUS
|
||||||
|
|
||||||
@ -57,7 +51,6 @@ class JubeatCopious(JubeatBase):
|
|||||||
|
|
||||||
|
|
||||||
class JubeatCopiousAppend(JubeatBase):
|
class JubeatCopiousAppend(JubeatBase):
|
||||||
|
|
||||||
name: str = "Jubeat Copious Append"
|
name: str = "Jubeat Copious Append"
|
||||||
version: int = VersionConstants.JUBEAT_COPIOUS_APPEND
|
version: int = VersionConstants.JUBEAT_COPIOUS_APPEND
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class MetalGearArcadeFactory(Factory):
|
class MetalGearArcadeFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
MetalGearArcade,
|
MetalGearArcade,
|
||||||
]
|
]
|
||||||
@ -25,7 +24,6 @@ class MetalGearArcadeFactory(Factory):
|
|||||||
model: Model,
|
model: Model,
|
||||||
parentmodel: Optional[Model] = None,
|
parentmodel: Optional[Model] = None,
|
||||||
) -> Optional[Base]:
|
) -> Optional[Base]:
|
||||||
|
|
||||||
if model.gamecode == "I36":
|
if model.gamecode == "I36":
|
||||||
return MetalGearArcade(data, config, model)
|
return MetalGearArcade(data, config, model)
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ class MetalGearArcade(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
MetalGearArcadeBase,
|
MetalGearArcadeBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "Metal Gear Arcade"
|
name: str = "Metal Gear Arcade"
|
||||||
version: int = VersionConstants.MGA
|
version: int = VersionConstants.MGA
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ class MusecaBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
||||||
for (_, attempt) in all_attempts:
|
for _, attempt in all_attempts:
|
||||||
# Terrible temporary structure is terrible.
|
# Terrible temporary structure is terrible.
|
||||||
if attempt.id not in attempts:
|
if attempt.id not in attempts:
|
||||||
attempts[attempt.id] = {}
|
attempts[attempt.id] = {}
|
||||||
|
@ -26,7 +26,7 @@ class MusecaGameHiscoreHandler(MusecaBase):
|
|||||||
|
|
||||||
hitchart = Node.void("hitchart")
|
hitchart = Node.void("hitchart")
|
||||||
game.add_child(hitchart)
|
game.add_child(hitchart)
|
||||||
for (songid, count) in playcounts:
|
for songid, count in playcounts:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
hitchart.add_child(info)
|
hitchart.add_child(info)
|
||||||
info.add_child(Node.u32("id", songid))
|
info.add_child(Node.u32("id", songid))
|
||||||
@ -42,7 +42,7 @@ class MusecaGameHiscoreHandler(MusecaBase):
|
|||||||
game.add_child(hiscore_allover)
|
game.add_child(hiscore_allover)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
@ -70,14 +70,14 @@ class MusecaGameHiscoreHandler(MusecaBase):
|
|||||||
self.game, self.version, userlist=area_users
|
self.game, self.version, userlist=area_users
|
||||||
)
|
)
|
||||||
missing_players = [uid for (uid, _) in records if uid not in users]
|
missing_players = [uid for (uid, _) in records if uid not in users]
|
||||||
for (uid, prof) in self.get_any_profiles(missing_players):
|
for uid, prof in self.get_any_profiles(missing_players):
|
||||||
users[uid] = prof
|
users[uid] = prof
|
||||||
|
|
||||||
hiscore_location = Node.void("hiscore_location")
|
hiscore_location = Node.void("hiscore_location")
|
||||||
game.add_child(hiscore_location)
|
game.add_child(hiscore_location)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
|
@ -8,7 +8,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class MusecaFactory(Factory):
|
class MusecaFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
Museca1,
|
Museca1,
|
||||||
Museca1Plus,
|
Museca1Plus,
|
||||||
|
@ -28,7 +28,6 @@ class Museca1(
|
|||||||
MusecaGameShopHandler,
|
MusecaGameShopHandler,
|
||||||
MusecaBase,
|
MusecaBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "MÚSECA"
|
name: str = "MÚSECA"
|
||||||
version: int = VersionConstants.MUSECA
|
version: int = VersionConstants.MUSECA
|
||||||
|
|
||||||
@ -125,7 +124,7 @@ class Museca1(
|
|||||||
):
|
):
|
||||||
ids.add((song.id, song.chart))
|
ids.add((song.id, song.chart))
|
||||||
|
|
||||||
for (songid, chart) in ids:
|
for songid, chart in ids:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
limited.add_child(info)
|
limited.add_child(info)
|
||||||
info.add_child(Node.s32("music_id", songid))
|
info.add_child(Node.s32("music_id", songid))
|
||||||
|
@ -29,7 +29,6 @@ class Museca1Plus(
|
|||||||
MusecaGameShopHandler,
|
MusecaGameShopHandler,
|
||||||
MusecaBase,
|
MusecaBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "MÚSECA 1+1/2"
|
name: str = "MÚSECA 1+1/2"
|
||||||
version: int = VersionConstants.MUSECA_1_PLUS
|
version: int = VersionConstants.MUSECA_1_PLUS
|
||||||
|
|
||||||
@ -137,7 +136,7 @@ class Museca1Plus(
|
|||||||
):
|
):
|
||||||
ids.add((song.id, song.chart))
|
ids.add((song.id, song.chart))
|
||||||
|
|
||||||
for (songid, chart) in ids:
|
for songid, chart in ids:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
limited.add_child(info)
|
limited.add_child(info)
|
||||||
info.add_child(Node.s32("music_id", songid))
|
info.add_child(Node.s32("music_id", songid))
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicModernBase(PopnMusicBase, ABC):
|
class PopnMusicModernBase(PopnMusicBase, ABC):
|
||||||
|
|
||||||
# Chart type, as returned from the game
|
# Chart type, as returned from the game
|
||||||
GAME_CHART_TYPE_EASY: Final[int] = 0
|
GAME_CHART_TYPE_EASY: Final[int] = 0
|
||||||
GAME_CHART_TYPE_NORMAL: Final[int] = 1
|
GAME_CHART_TYPE_NORMAL: Final[int] = 1
|
||||||
@ -304,7 +303,7 @@ class PopnMusicModernBase(PopnMusicBase, ABC):
|
|||||||
# Calculate most popular characters
|
# Calculate most popular characters
|
||||||
profiles = self.data.remote.user.get_all_profiles(self.game, self.version)
|
profiles = self.data.remote.user.get_all_profiles(self.game, self.version)
|
||||||
charas: Dict[int, int] = {}
|
charas: Dict[int, int] = {}
|
||||||
for (_userid, profile) in profiles:
|
for _userid, profile in profiles:
|
||||||
chara = profile.get_int("chara", -1)
|
chara = profile.get_int("chara", -1)
|
||||||
if chara <= 0:
|
if chara <= 0:
|
||||||
continue
|
continue
|
||||||
@ -328,7 +327,7 @@ class PopnMusicModernBase(PopnMusicBase, ABC):
|
|||||||
popular.add_child(Node.s16("chara_num", charaid))
|
popular.add_child(Node.s16("chara_num", charaid))
|
||||||
|
|
||||||
# Top 500 Popular music
|
# Top 500 Popular music
|
||||||
for (songid, _plays) in self.data.local.music.get_hit_chart(
|
for songid, _plays in self.data.local.music.get_hit_chart(
|
||||||
self.game, self.version, 500
|
self.game, self.version, 500
|
||||||
):
|
):
|
||||||
popular_music = Node.void("popular_music")
|
popular_music = Node.void("popular_music")
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicEclale(PopnMusicBase):
|
class PopnMusicEclale(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music éclale"
|
name: str = "Pop'n Music éclale"
|
||||||
version: int = VersionConstants.POPN_MUSIC_ECLALE
|
version: int = VersionConstants.POPN_MUSIC_ECLALE
|
||||||
|
|
||||||
@ -184,7 +183,7 @@ class PopnMusicEclale(PopnMusicBase):
|
|||||||
# Calculate most popular characters
|
# Calculate most popular characters
|
||||||
profiles = self.data.remote.user.get_all_profiles(self.game, self.version)
|
profiles = self.data.remote.user.get_all_profiles(self.game, self.version)
|
||||||
charas: Dict[int, int] = {}
|
charas: Dict[int, int] = {}
|
||||||
for (_userid, profile) in profiles:
|
for _userid, profile in profiles:
|
||||||
chara = profile.get_int("chara", -1)
|
chara = profile.get_int("chara", -1)
|
||||||
if chara <= 0:
|
if chara <= 0:
|
||||||
continue
|
continue
|
||||||
@ -202,7 +201,7 @@ class PopnMusicEclale(PopnMusicBase):
|
|||||||
|
|
||||||
# Output the top 20 of them
|
# Output the top 20 of them
|
||||||
rank = 1
|
rank = 1
|
||||||
for (charaid, _usecount) in charamap[:20]:
|
for charaid, _usecount in charamap[:20]:
|
||||||
popular = Node.void("popular")
|
popular = Node.void("popular")
|
||||||
root.add_child(popular)
|
root.add_child(popular)
|
||||||
popular.add_child(Node.s16("rank", rank))
|
popular.add_child(Node.s16("rank", rank))
|
||||||
@ -210,7 +209,7 @@ class PopnMusicEclale(PopnMusicBase):
|
|||||||
rank = rank + 1
|
rank = rank + 1
|
||||||
|
|
||||||
# Output the hit chart
|
# Output the hit chart
|
||||||
for (songid, _plays) in self.data.local.music.get_hit_chart(
|
for songid, _plays in self.data.local.music.get_hit_chart(
|
||||||
self.game, self.version, 500
|
self.game, self.version, 500
|
||||||
):
|
):
|
||||||
popular_music = Node.void("popular_music")
|
popular_music = Node.void("popular_music")
|
||||||
|
@ -34,7 +34,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicFactory(Factory):
|
class PopnMusicFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
PopnMusic,
|
PopnMusic,
|
||||||
PopnMusic2,
|
PopnMusic2,
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicFantasia(PopnMusicBase):
|
class PopnMusicFantasia(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music fantasia"
|
name: str = "Pop'n Music fantasia"
|
||||||
version: int = VersionConstants.POPN_MUSIC_FANTASIA
|
version: int = VersionConstants.POPN_MUSIC_FANTASIA
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ from bemani.protocol.node import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicKaimei(PopnMusicModernBase):
|
class PopnMusicKaimei(PopnMusicModernBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 解明リドルズ"
|
name: str = "Pop'n Music 解明リドルズ"
|
||||||
version: int = VersionConstants.POPN_MUSIC_KAIMEI_RIDDLES
|
version: int = VersionConstants.POPN_MUSIC_KAIMEI_RIDDLES
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicLapistoria(PopnMusicBase):
|
class PopnMusicLapistoria(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music ラピストリア"
|
name: str = "Pop'n Music ラピストリア"
|
||||||
version: int = VersionConstants.POPN_MUSIC_LAPISTORIA
|
version: int = VersionConstants.POPN_MUSIC_LAPISTORIA
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicPeace(PopnMusicModernBase):
|
class PopnMusicPeace(PopnMusicModernBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music peace"
|
name: str = "Pop'n Music peace"
|
||||||
version: int = VersionConstants.POPN_MUSIC_PEACE
|
version: int = VersionConstants.POPN_MUSIC_PEACE
|
||||||
|
|
||||||
|
@ -6,13 +6,11 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic(PopnMusicBase):
|
class PopnMusic(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music"
|
name: str = "Pop'n Music"
|
||||||
version: int = VersionConstants.POPN_MUSIC
|
version: int = VersionConstants.POPN_MUSIC
|
||||||
|
|
||||||
|
|
||||||
class PopnMusic2(PopnMusicBase):
|
class PopnMusic2(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 2"
|
name: str = "Pop'n Music 2"
|
||||||
version: int = VersionConstants.POPN_MUSIC_2
|
version: int = VersionConstants.POPN_MUSIC_2
|
||||||
|
|
||||||
@ -21,7 +19,6 @@ class PopnMusic2(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic3(PopnMusicBase):
|
class PopnMusic3(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 3"
|
name: str = "Pop'n Music 3"
|
||||||
version: int = VersionConstants.POPN_MUSIC_3
|
version: int = VersionConstants.POPN_MUSIC_3
|
||||||
|
|
||||||
@ -30,7 +27,6 @@ class PopnMusic3(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic4(PopnMusicBase):
|
class PopnMusic4(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 4"
|
name: str = "Pop'n Music 4"
|
||||||
version: int = VersionConstants.POPN_MUSIC_4
|
version: int = VersionConstants.POPN_MUSIC_4
|
||||||
|
|
||||||
@ -39,7 +35,6 @@ class PopnMusic4(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic5(PopnMusicBase):
|
class PopnMusic5(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 5"
|
name: str = "Pop'n Music 5"
|
||||||
version: int = VersionConstants.POPN_MUSIC_5
|
version: int = VersionConstants.POPN_MUSIC_5
|
||||||
|
|
||||||
@ -48,7 +43,6 @@ class PopnMusic5(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic6(PopnMusicBase):
|
class PopnMusic6(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 6"
|
name: str = "Pop'n Music 6"
|
||||||
version: int = VersionConstants.POPN_MUSIC_6
|
version: int = VersionConstants.POPN_MUSIC_6
|
||||||
|
|
||||||
@ -57,7 +51,6 @@ class PopnMusic6(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic7(PopnMusicBase):
|
class PopnMusic7(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 7"
|
name: str = "Pop'n Music 7"
|
||||||
version: int = VersionConstants.POPN_MUSIC_7
|
version: int = VersionConstants.POPN_MUSIC_7
|
||||||
|
|
||||||
@ -66,7 +59,6 @@ class PopnMusic7(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic8(PopnMusicBase):
|
class PopnMusic8(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 8"
|
name: str = "Pop'n Music 8"
|
||||||
version: int = VersionConstants.POPN_MUSIC_8
|
version: int = VersionConstants.POPN_MUSIC_8
|
||||||
|
|
||||||
@ -75,7 +67,6 @@ class PopnMusic8(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic9(PopnMusicBase):
|
class PopnMusic9(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 9"
|
name: str = "Pop'n Music 9"
|
||||||
version: int = VersionConstants.POPN_MUSIC_9
|
version: int = VersionConstants.POPN_MUSIC_9
|
||||||
|
|
||||||
@ -84,7 +75,6 @@ class PopnMusic9(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic10(PopnMusicBase):
|
class PopnMusic10(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 10"
|
name: str = "Pop'n Music 10"
|
||||||
version: int = VersionConstants.POPN_MUSIC_10
|
version: int = VersionConstants.POPN_MUSIC_10
|
||||||
|
|
||||||
@ -93,7 +83,6 @@ class PopnMusic10(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusic11(PopnMusicBase):
|
class PopnMusic11(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music 11"
|
name: str = "Pop'n Music 11"
|
||||||
version: int = VersionConstants.POPN_MUSIC_11
|
version: int = VersionConstants.POPN_MUSIC_11
|
||||||
|
|
||||||
@ -102,7 +91,6 @@ class PopnMusic11(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicIroha(PopnMusicBase):
|
class PopnMusicIroha(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music いろは"
|
name: str = "Pop'n Music いろは"
|
||||||
version: int = VersionConstants.POPN_MUSIC_IROHA
|
version: int = VersionConstants.POPN_MUSIC_IROHA
|
||||||
|
|
||||||
@ -111,7 +99,6 @@ class PopnMusicIroha(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicCarnival(PopnMusicBase):
|
class PopnMusicCarnival(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music カーニバル"
|
name: str = "Pop'n Music カーニバル"
|
||||||
version: int = VersionConstants.POPN_MUSIC_CARNIVAL
|
version: int = VersionConstants.POPN_MUSIC_CARNIVAL
|
||||||
|
|
||||||
@ -120,7 +107,6 @@ class PopnMusicCarnival(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicFever(PopnMusicBase):
|
class PopnMusicFever(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music FEVER!"
|
name: str = "Pop'n Music FEVER!"
|
||||||
version: int = VersionConstants.POPN_MUSIC_FEVER
|
version: int = VersionConstants.POPN_MUSIC_FEVER
|
||||||
|
|
||||||
@ -129,7 +115,6 @@ class PopnMusicFever(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicAdventure(PopnMusicBase):
|
class PopnMusicAdventure(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music ADVENTURE"
|
name: str = "Pop'n Music ADVENTURE"
|
||||||
version: int = VersionConstants.POPN_MUSIC_ADVENTURE
|
version: int = VersionConstants.POPN_MUSIC_ADVENTURE
|
||||||
|
|
||||||
@ -138,7 +123,6 @@ class PopnMusicAdventure(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicParty(PopnMusicBase):
|
class PopnMusicParty(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music Party♪"
|
name: str = "Pop'n Music Party♪"
|
||||||
version: int = VersionConstants.POPN_MUSIC_PARTY
|
version: int = VersionConstants.POPN_MUSIC_PARTY
|
||||||
|
|
||||||
@ -147,7 +131,6 @@ class PopnMusicParty(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicTheMovie(PopnMusicBase):
|
class PopnMusicTheMovie(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music THE MOVIE"
|
name: str = "Pop'n Music THE MOVIE"
|
||||||
version: int = VersionConstants.POPN_MUSIC_THE_MOVIE
|
version: int = VersionConstants.POPN_MUSIC_THE_MOVIE
|
||||||
|
|
||||||
@ -156,7 +139,6 @@ class PopnMusicTheMovie(PopnMusicBase):
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicSengokuRetsuden(PopnMusicBase):
|
class PopnMusicSengokuRetsuden(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music せんごく列伝"
|
name: str = "Pop'n Music せんごく列伝"
|
||||||
version: int = VersionConstants.POPN_MUSIC_SENGOKU_RETSUDEN
|
version: int = VersionConstants.POPN_MUSIC_SENGOKU_RETSUDEN
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicSunnyPark(PopnMusicBase):
|
class PopnMusicSunnyPark(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music Sunny Park"
|
name: str = "Pop'n Music Sunny Park"
|
||||||
version: int = VersionConstants.POPN_MUSIC_SUNNY_PARK
|
version: int = VersionConstants.POPN_MUSIC_SUNNY_PARK
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicTuneStreet(PopnMusicBase):
|
class PopnMusicTuneStreet(PopnMusicBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music TUNE STREET"
|
name: str = "Pop'n Music TUNE STREET"
|
||||||
version: int = VersionConstants.POPN_MUSIC_TUNE_STREET
|
version: int = VersionConstants.POPN_MUSIC_TUNE_STREET
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ from bemani.common import VersionConstants
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicUsaNeko(PopnMusicModernBase):
|
class PopnMusicUsaNeko(PopnMusicModernBase):
|
||||||
|
|
||||||
name: str = "Pop'n Music うさぎと猫と少年の夢"
|
name: str = "Pop'n Music うさぎと猫と少年の夢"
|
||||||
version: int = VersionConstants.POPN_MUSIC_USANEKO
|
version: int = VersionConstants.POPN_MUSIC_USANEKO
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatColette(ReflecBeatBase):
|
class ReflecBeatColette(ReflecBeatBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT colette"
|
name: str = "REFLEC BEAT colette"
|
||||||
version: int = VersionConstants.REFLEC_BEAT_COLETTE
|
version: int = VersionConstants.REFLEC_BEAT_COLETTE
|
||||||
|
|
||||||
@ -130,7 +129,7 @@ class ReflecBeatColette(ReflecBeatBase):
|
|||||||
9: 0,
|
9: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (eventid, phase) in events.items():
|
for eventid, phase in events.items():
|
||||||
data = Node.void("data")
|
data = Node.void("data")
|
||||||
event_ctrl.add_child(data)
|
event_ctrl.add_child(data)
|
||||||
data.add_child(Node.s32("type", eventid))
|
data.add_child(Node.s32("type", eventid))
|
||||||
@ -168,7 +167,7 @@ class ReflecBeatColette(ReflecBeatBase):
|
|||||||
new = Node.void("new")
|
new = Node.void("new")
|
||||||
base.add_child(new)
|
base.add_child(new)
|
||||||
|
|
||||||
for (mid, plays) in hitchart:
|
for mid, plays in hitchart:
|
||||||
d = Node.void("d")
|
d = Node.void("d")
|
||||||
new.add_child(d)
|
new.add_child(d)
|
||||||
d.add_child(Node.s16("mid", mid))
|
d.add_child(Node.s16("mid", mid))
|
||||||
@ -247,7 +246,7 @@ class ReflecBeatColette(ReflecBeatBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None:
|
def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None:
|
||||||
for (uid, ach) in selected:
|
for uid, ach in selected:
|
||||||
cmnt = Node.void(name)
|
cmnt = Node.void(name)
|
||||||
root.add_child(cmnt)
|
root.add_child(cmnt)
|
||||||
cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid))
|
cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid))
|
||||||
@ -431,7 +430,7 @@ class ReflecBeatColette(ReflecBeatBase):
|
|||||||
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
||||||
if userid is not None:
|
if userid is not None:
|
||||||
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
||||||
for (user, lobby) in lobbies:
|
for user, lobby in lobbies:
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatFactory(Factory):
|
class ReflecBeatFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
ReflecBeat,
|
ReflecBeat,
|
||||||
ReflecBeatLimelight,
|
ReflecBeatLimelight,
|
||||||
|
@ -10,7 +10,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatGroovin(ReflecBeatBase):
|
class ReflecBeatGroovin(ReflecBeatBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT groovin'!!"
|
name: str = "REFLEC BEAT groovin'!!"
|
||||||
version: int = VersionConstants.REFLEC_BEAT_GROOVIN
|
version: int = VersionConstants.REFLEC_BEAT_GROOVIN
|
||||||
|
|
||||||
@ -203,7 +202,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
||||||
if userid is not None:
|
if userid is not None:
|
||||||
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
||||||
for (user, lobby) in lobbies:
|
for user, lobby in lobbies:
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -318,7 +317,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids
|
profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids
|
||||||
]
|
]
|
||||||
|
|
||||||
for (rootnode, timeoffset) in [
|
for rootnode, timeoffset in [
|
||||||
(today, 0),
|
(today, 0),
|
||||||
(yesterday, Time.SECONDS_IN_DAY),
|
(yesterday, Time.SECONDS_IN_DAY),
|
||||||
]:
|
]:
|
||||||
@ -334,7 +333,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
|
|
||||||
# Calculate scores based on attempt
|
# Calculate scores based on attempt
|
||||||
scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {}
|
scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {}
|
||||||
for (userid, attempt) in relevant_attempts:
|
for userid, attempt in relevant_attempts:
|
||||||
if userid not in scores_by_user:
|
if userid not in scores_by_user:
|
||||||
scores_by_user[userid] = {}
|
scores_by_user[userid] = {}
|
||||||
if attempt.id not in scores_by_user[userid]:
|
if attempt.id not in scores_by_user[userid]:
|
||||||
@ -362,7 +361,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Output that day's earned points
|
# Output that day's earned points
|
||||||
for (userid, profile) in relevant_profiles:
|
for userid, profile in relevant_profiles:
|
||||||
data = Node.void("data")
|
data = Node.void("data")
|
||||||
rootnode.add_child(data)
|
rootnode.add_child(data)
|
||||||
data.add_child(
|
data.add_child(
|
||||||
@ -409,7 +408,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
new = Node.void("new")
|
new = Node.void("new")
|
||||||
base.add_child(new)
|
base.add_child(new)
|
||||||
|
|
||||||
for (mid, plays) in hitchart:
|
for mid, plays in hitchart:
|
||||||
d = Node.void("d")
|
d = Node.void("d")
|
||||||
new.add_child(d)
|
new.add_child(d)
|
||||||
d.add_child(Node.s16("mid", mid))
|
d.add_child(Node.s16("mid", mid))
|
||||||
@ -546,7 +545,7 @@ class ReflecBeatGroovin(ReflecBeatBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None:
|
def add_comments(name: str, selected: List[Tuple[UserID, Achievement]]) -> None:
|
||||||
for (uid, ach) in selected:
|
for uid, ach in selected:
|
||||||
cmnt = Node.void(name)
|
cmnt = Node.void(name)
|
||||||
root.add_child(cmnt)
|
root.add_child(cmnt)
|
||||||
cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid))
|
cmnt.add_child(Node.s32("uid", uid_mapping[uid].extid))
|
||||||
|
@ -10,7 +10,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatLimelight(ReflecBeatBase):
|
class ReflecBeatLimelight(ReflecBeatBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT limelight"
|
name: str = "REFLEC BEAT limelight"
|
||||||
version: int = VersionConstants.REFLEC_BEAT_LIMELIGHT
|
version: int = VersionConstants.REFLEC_BEAT_LIMELIGHT
|
||||||
|
|
||||||
@ -134,7 +133,7 @@ class ReflecBeatLimelight(ReflecBeatBase):
|
|||||||
def __add_event_info(self, request: Node) -> None:
|
def __add_event_info(self, request: Node) -> None:
|
||||||
events: Dict[int, int] = {}
|
events: Dict[int, int] = {}
|
||||||
|
|
||||||
for (_eventid, _phase) in events.items():
|
for _eventid, _phase in events.items():
|
||||||
data = Node.void("data")
|
data = Node.void("data")
|
||||||
request.add_child(data)
|
request.add_child(data)
|
||||||
data.add_child(Node.s32("type", -1))
|
data.add_child(Node.s32("type", -1))
|
||||||
@ -163,7 +162,7 @@ class ReflecBeatLimelight(ReflecBeatBase):
|
|||||||
|
|
||||||
hitchart = self.data.local.music.get_hit_chart(self.game, self.version, 10)
|
hitchart = self.data.local.music.get_hit_chart(self.game, self.version, 10)
|
||||||
rank = 1
|
rank = 1
|
||||||
for (mid, _plays) in hitchart:
|
for mid, _plays in hitchart:
|
||||||
record = Node.void("record")
|
record = Node.void("record")
|
||||||
originals.add_child(record)
|
originals.add_child(record)
|
||||||
record.add_child(Node.s16("id", mid))
|
record.add_child(Node.s16("id", mid))
|
||||||
@ -211,7 +210,7 @@ class ReflecBeatLimelight(ReflecBeatBase):
|
|||||||
commentnode = Node.void("comment")
|
commentnode = Node.void("comment")
|
||||||
root.add_child(commentnode)
|
root.add_child(commentnode)
|
||||||
|
|
||||||
for (uid, comment) in comments:
|
for uid, comment in comments:
|
||||||
lid = ID.parse_machine_id(comment.data.get_str("lid"))
|
lid = ID.parse_machine_id(comment.data.get_str("lid"))
|
||||||
|
|
||||||
# Look up external data for the request
|
# Look up external data for the request
|
||||||
@ -237,7 +236,7 @@ class ReflecBeatLimelight(ReflecBeatBase):
|
|||||||
c.add_child(Node.string("comment", comment.data.get_str("comment")))
|
c.add_child(Node.string("comment", comment.data.get_str("comment")))
|
||||||
c.add_child(Node.bool("is_tweet", comment.data.get_bool("tweet")))
|
c.add_child(Node.bool("is_tweet", comment.data.get_bool("tweet")))
|
||||||
|
|
||||||
for (uid, status) in statuses:
|
for uid, status in statuses:
|
||||||
lid = ID.parse_machine_id(status.get_str("lid"))
|
lid = ID.parse_machine_id(status.get_str("lid"))
|
||||||
|
|
||||||
# Look up external data for the request
|
# Look up external data for the request
|
||||||
@ -408,7 +407,7 @@ class ReflecBeatLimelight(ReflecBeatBase):
|
|||||||
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
||||||
if userid is not None:
|
if userid is not None:
|
||||||
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
||||||
for (user, lobby) in lobbies:
|
for user, lobby in lobbies:
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeat(ReflecBeatBase):
|
class ReflecBeat(ReflecBeatBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT"
|
name: str = "REFLEC BEAT"
|
||||||
version: int = VersionConstants.REFLEC_BEAT
|
version: int = VersionConstants.REFLEC_BEAT
|
||||||
|
|
||||||
@ -129,7 +128,7 @@ class ReflecBeat(ReflecBeatBase):
|
|||||||
def __add_event_info(self, request: Node) -> None:
|
def __add_event_info(self, request: Node) -> None:
|
||||||
events: Dict[int, int] = {}
|
events: Dict[int, int] = {}
|
||||||
|
|
||||||
for (_eventid, _phase) in events.items():
|
for _eventid, _phase in events.items():
|
||||||
data = Node.void("data")
|
data = Node.void("data")
|
||||||
request.add_child(data)
|
request.add_child(data)
|
||||||
data.add_child(Node.s32("type", -1))
|
data.add_child(Node.s32("type", -1))
|
||||||
@ -210,7 +209,7 @@ class ReflecBeat(ReflecBeatBase):
|
|||||||
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
||||||
if userid is not None:
|
if userid is not None:
|
||||||
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
||||||
for (user, lobby) in lobbies:
|
for user, lobby in lobbies:
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatVolzza(ReflecBeatVolzzaBase):
|
class ReflecBeatVolzza(ReflecBeatVolzzaBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT VOLZZA"
|
name: str = "REFLEC BEAT VOLZZA"
|
||||||
version: int = VersionConstants.REFLEC_BEAT_VOLZZA
|
version: int = VersionConstants.REFLEC_BEAT_VOLZZA
|
||||||
|
|
||||||
@ -168,7 +167,7 @@ class ReflecBeatVolzza(ReflecBeatVolzzaBase):
|
|||||||
scores_by_musicid[score.id] = [None, None, None, None]
|
scores_by_musicid[score.id] = [None, None, None, None]
|
||||||
scores_by_musicid[score.id][score.chart] = score
|
scores_by_musicid[score.id][score.chart] = score
|
||||||
|
|
||||||
for (mid, scores) in scores_by_musicid.items():
|
for mid, scores in scores_by_musicid.items():
|
||||||
points = [
|
points = [
|
||||||
score.points << 32 if score is not None else 0
|
score.points << 32 if score is not None else 0
|
||||||
for score in scores
|
for score in scores
|
||||||
|
@ -10,7 +10,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatVolzza2(ReflecBeatVolzzaBase):
|
class ReflecBeatVolzza2(ReflecBeatVolzzaBase):
|
||||||
|
|
||||||
name: str = "REFLEC BEAT VOLZZA 2"
|
name: str = "REFLEC BEAT VOLZZA 2"
|
||||||
version: int = VersionConstants.REFLEC_BEAT_VOLZZA_2
|
version: int = VersionConstants.REFLEC_BEAT_VOLZZA_2
|
||||||
|
|
||||||
@ -192,7 +191,7 @@ class ReflecBeatVolzza2(ReflecBeatVolzzaBase):
|
|||||||
scores_by_musicid[score.id] = [None, None, None, None]
|
scores_by_musicid[score.id] = [None, None, None, None]
|
||||||
scores_by_musicid[score.id][score.chart] = score
|
scores_by_musicid[score.id][score.chart] = score
|
||||||
|
|
||||||
for (mid, scores) in scores_by_musicid.items():
|
for mid, scores in scores_by_musicid.items():
|
||||||
points = [
|
points = [
|
||||||
score.points << 32 if score is not None else 0
|
score.points << 32 if score is not None else 0
|
||||||
for score in scores
|
for score in scores
|
||||||
|
@ -9,7 +9,6 @@ from bemani.protocol import Node
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatVolzzaBase(ReflecBeatBase):
|
class ReflecBeatVolzzaBase(ReflecBeatBase):
|
||||||
|
|
||||||
# Clear types according to the game
|
# Clear types according to the game
|
||||||
GAME_CLEAR_TYPE_NO_PLAY: Final[int] = 0
|
GAME_CLEAR_TYPE_NO_PLAY: Final[int] = 0
|
||||||
GAME_CLEAR_TYPE_EARLY_FAILED: Final[int] = 1
|
GAME_CLEAR_TYPE_EARLY_FAILED: Final[int] = 1
|
||||||
@ -99,7 +98,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase):
|
|||||||
profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids
|
profile for profile in all_profiles if profile[1].get_int("lid", -1) in lids
|
||||||
]
|
]
|
||||||
|
|
||||||
for (rootnode, timeoffset) in [
|
for rootnode, timeoffset in [
|
||||||
(today, 0),
|
(today, 0),
|
||||||
(yesterday, Time.SECONDS_IN_DAY),
|
(yesterday, Time.SECONDS_IN_DAY),
|
||||||
]:
|
]:
|
||||||
@ -115,7 +114,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase):
|
|||||||
|
|
||||||
# Calculate scores based on attempt
|
# Calculate scores based on attempt
|
||||||
scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {}
|
scores_by_user: Dict[UserID, Dict[int, Dict[int, Attempt]]] = {}
|
||||||
for (userid, attempt) in relevant_attempts:
|
for userid, attempt in relevant_attempts:
|
||||||
if userid not in scores_by_user:
|
if userid not in scores_by_user:
|
||||||
scores_by_user[userid] = {}
|
scores_by_user[userid] = {}
|
||||||
if attempt.id not in scores_by_user[userid]:
|
if attempt.id not in scores_by_user[userid]:
|
||||||
@ -143,7 +142,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Output that day's earned points
|
# Output that day's earned points
|
||||||
for (userid, profile) in relevant_profiles:
|
for userid, profile in relevant_profiles:
|
||||||
data = Node.void("data")
|
data = Node.void("data")
|
||||||
rootnode.add_child(data)
|
rootnode.add_child(data)
|
||||||
data.add_child(
|
data.add_child(
|
||||||
@ -187,7 +186,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase):
|
|||||||
new = Node.void("new")
|
new = Node.void("new")
|
||||||
base.add_child(new)
|
base.add_child(new)
|
||||||
|
|
||||||
for (mid, plays) in hitchart:
|
for mid, plays in hitchart:
|
||||||
d = Node.void("d")
|
d = Node.void("d")
|
||||||
new.add_child(d)
|
new.add_child(d)
|
||||||
d.add_child(Node.s16("mid", mid))
|
d.add_child(Node.s16("mid", mid))
|
||||||
@ -358,7 +357,7 @@ class ReflecBeatVolzzaBase(ReflecBeatBase):
|
|||||||
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
userid = self.data.remote.user.from_extid(self.game, self.version, extid)
|
||||||
if userid is not None:
|
if userid is not None:
|
||||||
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
lobbies = self.data.local.lobby.get_all_lobbies(self.game, self.version)
|
||||||
for (user, lobby) in lobbies:
|
for user, lobby in lobbies:
|
||||||
if limit <= 0:
|
if limit <= 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ class SoundVoltexBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
attempts: Dict[int, Dict[int, Dict[str, int]]] = {}
|
||||||
for (_, attempt) in all_attempts:
|
for _, attempt in all_attempts:
|
||||||
# Terrible temporary structure is terrible.
|
# Terrible temporary structure is terrible.
|
||||||
if attempt.id not in attempts:
|
if attempt.id not in attempts:
|
||||||
attempts[attempt.id] = {}
|
attempts[attempt.id] = {}
|
||||||
|
@ -13,7 +13,6 @@ class SoundVoltexBooth(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
SoundVoltexBase,
|
SoundVoltexBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "SOUND VOLTEX BOOTH"
|
name: str = "SOUND VOLTEX BOOTH"
|
||||||
version: int = VersionConstants.SDVX_BOOTH
|
version: int = VersionConstants.SDVX_BOOTH
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ from bemani.data import Config, Data
|
|||||||
|
|
||||||
|
|
||||||
class SoundVoltexFactory(Factory):
|
class SoundVoltexFactory(Factory):
|
||||||
|
|
||||||
MANAGED_CLASSES: List[Type[Base]] = [
|
MANAGED_CLASSES: List[Type[Base]] = [
|
||||||
SoundVoltexBooth,
|
SoundVoltexBooth,
|
||||||
SoundVoltexInfiniteInfection,
|
SoundVoltexInfiniteInfection,
|
||||||
|
@ -13,7 +13,6 @@ class SoundVoltexGravityWars(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
SoundVoltexBase,
|
SoundVoltexBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "SOUND VOLTEX III GRAVITY WARS"
|
name: str = "SOUND VOLTEX III GRAVITY WARS"
|
||||||
version: int = VersionConstants.SDVX_GRAVITY_WARS
|
version: int = VersionConstants.SDVX_GRAVITY_WARS
|
||||||
|
|
||||||
@ -171,7 +170,7 @@ class SoundVoltexGravityWars(
|
|||||||
):
|
):
|
||||||
ids.add((song.id, song.chart))
|
ids.add((song.id, song.chart))
|
||||||
|
|
||||||
for (songid, chart) in ids:
|
for songid, chart in ids:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
limited.add_child(info)
|
limited.add_child(info)
|
||||||
info.add_child(Node.s32("music_id", songid))
|
info.add_child(Node.s32("music_id", songid))
|
||||||
|
@ -3054,7 +3054,7 @@ class SoundVoltexGravityWarsSeason1(
|
|||||||
|
|
||||||
hitchart = Node.void("hitchart")
|
hitchart = Node.void("hitchart")
|
||||||
game.add_child(hitchart)
|
game.add_child(hitchart)
|
||||||
for (songid, count) in playcounts:
|
for songid, count in playcounts:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
hitchart.add_child(info)
|
hitchart.add_child(info)
|
||||||
info.add_child(Node.u32("id", songid))
|
info.add_child(Node.u32("id", songid))
|
||||||
@ -3072,7 +3072,7 @@ class SoundVoltexGravityWarsSeason1(
|
|||||||
game.add_child(hiscore_allover)
|
game.add_child(hiscore_allover)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
@ -3100,14 +3100,14 @@ class SoundVoltexGravityWarsSeason1(
|
|||||||
self.game, self.version, userlist=area_users
|
self.game, self.version, userlist=area_users
|
||||||
)
|
)
|
||||||
missing_users = [userid for (userid, _) in records if userid not in users]
|
missing_users = [userid for (userid, _) in records if userid not in users]
|
||||||
for (userid, profile) in self.get_any_profiles(missing_users):
|
for userid, profile in self.get_any_profiles(missing_users):
|
||||||
users[userid] = profile
|
users[userid] = profile
|
||||||
|
|
||||||
hiscore_location = Node.void("hiscore_location")
|
hiscore_location = Node.void("hiscore_location")
|
||||||
game.add_child(hiscore_location)
|
game.add_child(hiscore_location)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
|
@ -3842,7 +3842,7 @@ class SoundVoltexGravityWarsSeason2(
|
|||||||
|
|
||||||
hitchart = Node.void("hit")
|
hitchart = Node.void("hit")
|
||||||
game.add_child(hitchart)
|
game.add_child(hitchart)
|
||||||
for (songid, count) in playcounts:
|
for songid, count in playcounts:
|
||||||
info = Node.void("d")
|
info = Node.void("d")
|
||||||
hitchart.add_child(info)
|
hitchart.add_child(info)
|
||||||
info.add_child(Node.u32("id", songid))
|
info.add_child(Node.u32("id", songid))
|
||||||
@ -3866,10 +3866,10 @@ class SoundVoltexGravityWarsSeason2(
|
|||||||
missing_users = [
|
missing_users = [
|
||||||
userid for (userid, _) in global_records if userid not in users
|
userid for (userid, _) in global_records if userid not in users
|
||||||
] + [userid for (userid, _) in area_records if userid not in users]
|
] + [userid for (userid, _) in area_records if userid not in users]
|
||||||
for (userid, profile) in self.get_any_profiles(missing_users):
|
for userid, profile in self.get_any_profiles(missing_users):
|
||||||
users[userid] = profile
|
users[userid] = profile
|
||||||
|
|
||||||
for (userid, score) in global_records:
|
for userid, score in global_records:
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
raise Exception("Logic error, missing profile for user!")
|
raise Exception("Logic error, missing profile for user!")
|
||||||
if score.id not in records:
|
if score.id not in records:
|
||||||
@ -3878,7 +3878,7 @@ class SoundVoltexGravityWarsSeason2(
|
|||||||
records[score.id][score.chart] = {}
|
records[score.id][score.chart] = {}
|
||||||
records[score.id][score.chart]["global"] = (userid, score)
|
records[score.id][score.chart]["global"] = (userid, score)
|
||||||
|
|
||||||
for (userid, score) in area_records:
|
for userid, score in area_records:
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
raise Exception("Logic error, missing profile for user!")
|
raise Exception("Logic error, missing profile for user!")
|
||||||
if score.id not in records:
|
if score.id not in records:
|
||||||
|
@ -14,7 +14,6 @@ class SoundVoltexHeavenlyHaven(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
SoundVoltexBase,
|
SoundVoltexBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "SOUND VOLTEX IV HEAVENLY HAVEN"
|
name: str = "SOUND VOLTEX IV HEAVENLY HAVEN"
|
||||||
version: int = VersionConstants.SDVX_HEAVENLY_HAVEN
|
version: int = VersionConstants.SDVX_HEAVENLY_HAVEN
|
||||||
|
|
||||||
@ -3266,7 +3265,7 @@ class SoundVoltexHeavenlyHaven(
|
|||||||
):
|
):
|
||||||
ids.add((song.id, song.chart))
|
ids.add((song.id, song.chart))
|
||||||
|
|
||||||
for (songid, chart) in ids:
|
for songid, chart in ids:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
limited.add_child(info)
|
limited.add_child(info)
|
||||||
info.add_child(Node.s32("music_id", songid))
|
info.add_child(Node.s32("music_id", songid))
|
||||||
@ -3478,10 +3477,10 @@ class SoundVoltexHeavenlyHaven(
|
|||||||
missing_users = [
|
missing_users = [
|
||||||
userid for (userid, _) in global_records if userid not in users
|
userid for (userid, _) in global_records if userid not in users
|
||||||
] + [userid for (userid, _) in area_records if userid not in users]
|
] + [userid for (userid, _) in area_records if userid not in users]
|
||||||
for (userid, profile) in self.get_any_profiles(missing_users):
|
for userid, profile in self.get_any_profiles(missing_users):
|
||||||
users[userid] = profile
|
users[userid] = profile
|
||||||
|
|
||||||
for (userid, score) in global_records:
|
for userid, score in global_records:
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
raise Exception("Logic error, missing profile for user!")
|
raise Exception("Logic error, missing profile for user!")
|
||||||
if score.id not in records:
|
if score.id not in records:
|
||||||
@ -3490,7 +3489,7 @@ class SoundVoltexHeavenlyHaven(
|
|||||||
records[score.id][score.chart] = {}
|
records[score.id][score.chart] = {}
|
||||||
records[score.id][score.chart]["global"] = (userid, score)
|
records[score.id][score.chart]["global"] = (userid, score)
|
||||||
|
|
||||||
for (userid, score) in area_records:
|
for userid, score in area_records:
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
raise Exception("Logic error, missing profile for user!")
|
raise Exception("Logic error, missing profile for user!")
|
||||||
if score.id not in records:
|
if score.id not in records:
|
||||||
|
@ -14,7 +14,6 @@ class SoundVoltexInfiniteInfection(
|
|||||||
EventLogHandler,
|
EventLogHandler,
|
||||||
SoundVoltexBase,
|
SoundVoltexBase,
|
||||||
):
|
):
|
||||||
|
|
||||||
name: str = "SOUND VOLTEX II -infinite infection-"
|
name: str = "SOUND VOLTEX II -infinite infection-"
|
||||||
version: int = VersionConstants.SDVX_INFINITE_INFECTION
|
version: int = VersionConstants.SDVX_INFINITE_INFECTION
|
||||||
|
|
||||||
@ -1876,7 +1875,7 @@ class SoundVoltexInfiniteInfection(
|
|||||||
):
|
):
|
||||||
ids.add((song.id, song.chart))
|
ids.add((song.id, song.chart))
|
||||||
|
|
||||||
for (songid, chart) in ids:
|
for songid, chart in ids:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
limited.add_child(info)
|
limited.add_child(info)
|
||||||
info.add_child(Node.s32("music_id", songid))
|
info.add_child(Node.s32("music_id", songid))
|
||||||
@ -1975,7 +1974,7 @@ class SoundVoltexInfiniteInfection(
|
|||||||
|
|
||||||
hitchart = Node.void("hitchart")
|
hitchart = Node.void("hitchart")
|
||||||
game.add_child(hitchart)
|
game.add_child(hitchart)
|
||||||
for (songid, count) in playcounts:
|
for songid, count in playcounts:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
hitchart.add_child(info)
|
hitchart.add_child(info)
|
||||||
info.add_child(Node.u32("id", songid))
|
info.add_child(Node.u32("id", songid))
|
||||||
@ -1993,7 +1992,7 @@ class SoundVoltexInfiniteInfection(
|
|||||||
game.add_child(hiscore_allover)
|
game.add_child(hiscore_allover)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
@ -2021,14 +2020,14 @@ class SoundVoltexInfiniteInfection(
|
|||||||
self.game, self.version, userlist=area_users
|
self.game, self.version, userlist=area_users
|
||||||
)
|
)
|
||||||
missing_users = [userid for (userid, _) in records if userid not in users]
|
missing_users = [userid for (userid, _) in records if userid not in users]
|
||||||
for (userid, profile) in self.get_any_profiles(missing_users):
|
for userid, profile in self.get_any_profiles(missing_users):
|
||||||
users[userid] = profile
|
users[userid] = profile
|
||||||
|
|
||||||
hiscore_location = Node.void("hiscore_location")
|
hiscore_location = Node.void("hiscore_location")
|
||||||
game.add_child(hiscore_location)
|
game.add_child(hiscore_location)
|
||||||
|
|
||||||
# Output records
|
# Output records
|
||||||
for (userid, score) in records:
|
for userid, score in records:
|
||||||
info = Node.void("info")
|
info = Node.void("info")
|
||||||
|
|
||||||
if userid not in users:
|
if userid not in users:
|
||||||
|
@ -380,7 +380,7 @@ class ReflecBeatLimelight(BaseClient):
|
|||||||
blog = Node.void("blog")
|
blog = Node.void("blog")
|
||||||
pdata.add_child(blog)
|
pdata.add_child(blog)
|
||||||
|
|
||||||
for (_, record) in sortedrecords.items():
|
for _, record in sortedrecords.items():
|
||||||
rec = Node.void("rec")
|
rec = Node.void("rec")
|
||||||
recordnode.add_child(rec)
|
recordnode.add_child(rec)
|
||||||
rec.add_child(Node.u16("mid", record["id"]))
|
rec.add_child(Node.u16("mid", record["id"]))
|
||||||
|
@ -261,7 +261,7 @@ class ReflecBeat(BaseClient):
|
|||||||
blog = Node.void("blog")
|
blog = Node.void("blog")
|
||||||
pdata.add_child(blog)
|
pdata.add_child(blog)
|
||||||
|
|
||||||
for (_, record) in sortedrecords.items():
|
for _, record in sortedrecords.items():
|
||||||
rec = Node.void("rec")
|
rec = Node.void("rec")
|
||||||
recordnode.add_child(rec)
|
recordnode.add_child(rec)
|
||||||
rec.add_child(Node.u16("mid", record["id"]))
|
rec.add_child(Node.u16("mid", record["id"]))
|
||||||
|
@ -725,7 +725,7 @@ class GlobalMusicData(BaseGlobalData):
|
|||||||
return allscores.get(userid, {}).get(songid, {}).get(songchart)
|
return allscores.get(userid, {}).get(songid, {}).get(songchart)
|
||||||
|
|
||||||
# First, seed with local scores
|
# First, seed with local scores
|
||||||
for (userid, score) in localscores:
|
for userid, score in localscores:
|
||||||
add_score(userid, score)
|
add_score(userid, score)
|
||||||
|
|
||||||
# Second, merge in remote scorse
|
# Second, merge in remote scorse
|
||||||
@ -830,7 +830,7 @@ class GlobalMusicData(BaseGlobalData):
|
|||||||
return allscores.get(songid, {}).get(songchart, (None, None))
|
return allscores.get(songid, {}).get(songchart, (None, None))
|
||||||
|
|
||||||
# First, seed with local records
|
# First, seed with local records
|
||||||
for (userid, score) in localscores:
|
for userid, score in localscores:
|
||||||
add_score(userid, score)
|
add_score(userid, score)
|
||||||
|
|
||||||
# Second, merge in remote records
|
# Second, merge in remote records
|
||||||
|
@ -19,7 +19,6 @@ class GlobalUserData(BaseGlobalData):
|
|||||||
updates["area"] = area
|
updates["area"] = area
|
||||||
|
|
||||||
def __format_iidx_profile(self, updates: Profile, profile: Profile) -> None:
|
def __format_iidx_profile(self, updates: Profile, profile: Profile) -> None:
|
||||||
|
|
||||||
area = profile.get_int("area", -1)
|
area = profile.get_int("area", -1)
|
||||||
if area != -1:
|
if area != -1:
|
||||||
updates["pid"] = area
|
updates["pid"] = area
|
||||||
|
@ -38,7 +38,6 @@ class _BytesEncoder(json.JSONEncoder):
|
|||||||
|
|
||||||
|
|
||||||
class BaseData:
|
class BaseData:
|
||||||
|
|
||||||
SESSION_LENGTH: Final[int] = 32
|
SESSION_LENGTH: Final[int] = 32
|
||||||
|
|
||||||
def __init__(self, config: Config, conn: Connection) -> None:
|
def __init__(self, config: Config, conn: Connection) -> None:
|
||||||
|
@ -83,7 +83,6 @@ class ArcadeCreationException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class MachineData(BaseData):
|
class MachineData(BaseData):
|
||||||
|
|
||||||
# This relies on the fact that arcadeid in the arcade_settings table is auto-increment
|
# This relies on the fact that arcadeid in the arcade_settings table is auto-increment
|
||||||
# and thus will start at 1.
|
# and thus will start at 1.
|
||||||
DEFAULT_SETTINGS_ARCADE: Final[ArcadeID] = ArcadeID(-1)
|
DEFAULT_SETTINGS_ARCADE: Final[ArcadeID] = ArcadeID(-1)
|
||||||
|
@ -174,7 +174,6 @@ class AccountCreationException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class UserData(BaseData):
|
class UserData(BaseData):
|
||||||
|
|
||||||
REF_ID_LENGTH: Final[int] = 16
|
REF_ID_LENGTH: Final[int] = 16
|
||||||
|
|
||||||
def from_cardid(self, cardid: str) -> Optional[UserID]:
|
def from_cardid(self, cardid: str) -> Optional[UserID]:
|
||||||
|
@ -21,7 +21,7 @@ def perspective_calculate(
|
|||||||
uvz: Dict[Point, Point] = {}
|
uvz: Dict[Point, Point] = {}
|
||||||
minz: Optional[float] = None
|
minz: Optional[float] = None
|
||||||
maxz: Optional[float] = None
|
maxz: Optional[float] = None
|
||||||
for (texx, texy) in [
|
for texx, texy in [
|
||||||
(0, 0),
|
(0, 0),
|
||||||
(texwidth, 0),
|
(texwidth, 0),
|
||||||
(0, texheight),
|
(0, texheight),
|
||||||
|
@ -1144,7 +1144,7 @@ class TXP2File(TrackedCoverage, VerboseOutput):
|
|||||||
tuples: List[Tuple[str, int]] = [(name, strings[name]) for name in strings]
|
tuples: List[Tuple[str, int]] = [(name, strings[name]) for name in strings]
|
||||||
tuples = sorted(tuples, key=lambda tup: tup[1])
|
tuples = sorted(tuples, key=lambda tup: tup[1])
|
||||||
|
|
||||||
for (string, offset) in tuples:
|
for string, offset in tuples:
|
||||||
data = pad(data, offset)
|
data = pad(data, offset)
|
||||||
data += scramble_text(string, self.text_obfuscated)
|
data += scramble_text(string, self.text_obfuscated)
|
||||||
|
|
||||||
|
@ -3302,7 +3302,6 @@ class SWF(VerboseOutput, TrackedCoverage):
|
|||||||
# This appears to be bytecode to execute on a per-frame basis. We execute this every frame and
|
# This appears to be bytecode to execute on a per-frame basis. We execute this every frame and
|
||||||
# only execute up to the point where we equal the current frame.
|
# only execute up to the point where we equal the current frame.
|
||||||
if imported_tag_initializers_offset is not None:
|
if imported_tag_initializers_offset is not None:
|
||||||
|
|
||||||
unk1, length = struct.unpack(
|
unk1, length = struct.unpack(
|
||||||
"<HH",
|
"<HH",
|
||||||
data[
|
data[
|
||||||
|
@ -78,7 +78,6 @@ class DXTBuffer:
|
|||||||
file = io.BytesIO(filedata)
|
file = io.BytesIO(filedata)
|
||||||
for row in range(self.block_county):
|
for row in range(self.block_county):
|
||||||
for col in range(self.block_countx):
|
for col in range(self.block_countx):
|
||||||
|
|
||||||
# Color 1 color 2, color look up table
|
# Color 1 color 2, color look up table
|
||||||
c0, c1, ctable = struct.unpack(
|
c0, c1, ctable = struct.unpack(
|
||||||
"<HHI", self.swapbytes(file.read(8), swap)
|
"<HHI", self.swapbytes(file.read(8), swap)
|
||||||
|
@ -285,7 +285,7 @@ def viewarcades() -> Response:
|
|||||||
@adminrequired
|
@adminrequired
|
||||||
def viewmachines() -> Response:
|
def viewmachines() -> Response:
|
||||||
games: Dict[str, Dict[int, str]] = {}
|
games: Dict[str, Dict[int, str]] = {}
|
||||||
for (game, version, name) in Base.all_games():
|
for game, version, name in Base.all_games():
|
||||||
if game.value not in games:
|
if game.value not in games:
|
||||||
games[game.value] = {}
|
games[game.value] = {}
|
||||||
games[game.value][version] = name
|
games[game.value][version] = name
|
||||||
|
@ -11,7 +11,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class BishiBashiFrontend(FrontendBase):
|
class BishiBashiFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.BISHI_BASHI
|
game: GameConstants = GameConstants.BISHI_BASHI
|
||||||
|
|
||||||
def __init__(self, data: Data, config: Config, cache: Cache) -> None:
|
def __init__(self, data: Data, config: Config, cache: Cache) -> None:
|
||||||
|
@ -9,7 +9,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class DDRFrontend(FrontendBase):
|
class DDRFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.DDR
|
game: GameConstants = GameConstants.DDR
|
||||||
|
|
||||||
version: int = 0 # We use a virtual version for DDR to tie charts together
|
version: int = 0 # We use a virtual version for DDR to tie charts together
|
||||||
|
@ -517,7 +517,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.DDR, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.DDR, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
@ -10,14 +10,14 @@ def get_game_settings(data: Data, arcadeid: ArcadeID) -> List[Dict[str, Any]]:
|
|||||||
settings_lut: Dict[GameConstants, Dict[int, Dict[str, Any]]] = {}
|
settings_lut: Dict[GameConstants, Dict[int, Dict[str, Any]]] = {}
|
||||||
all_settings = []
|
all_settings = []
|
||||||
|
|
||||||
for (game, version, name) in Base.all_games():
|
for game, version, name in Base.all_games():
|
||||||
if game not in game_lut:
|
if game not in game_lut:
|
||||||
game_lut[game] = {}
|
game_lut[game] = {}
|
||||||
settings_lut[game] = {}
|
settings_lut[game] = {}
|
||||||
game_lut[game][version] = name
|
game_lut[game][version] = name
|
||||||
settings_lut[game][version] = {}
|
settings_lut[game][version] = {}
|
||||||
|
|
||||||
for (game, version, settings) in Base.all_settings():
|
for game, version, settings in Base.all_settings():
|
||||||
if not settings:
|
if not settings:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.IIDX, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.IIDX, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == djname.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == djname.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class IIDXFrontend(FrontendBase):
|
class IIDXFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.IIDX
|
game: GameConstants = GameConstants.IIDX
|
||||||
|
|
||||||
valid_charts: List[int] = [
|
valid_charts: List[int] = [
|
||||||
|
@ -491,7 +491,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.JUBEAT, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.JUBEAT, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class JubeatFrontend(FrontendBase):
|
class JubeatFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.JUBEAT
|
game: GameConstants = GameConstants.JUBEAT
|
||||||
|
|
||||||
valid_charts: List[int] = [
|
valid_charts: List[int] = [
|
||||||
@ -38,7 +37,7 @@ class JubeatFrontend(FrontendBase):
|
|||||||
VersionConstants.JUBEAT_FESTO: 9,
|
VersionConstants.JUBEAT_FESTO: 9,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (game, version, name) in self.all_games():
|
for game, version, name in self.all_games():
|
||||||
if version in mapping:
|
if version in mapping:
|
||||||
yield (game, mapping[version], name)
|
yield (game, mapping[version], name)
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class MetalGearArcadeFrontend(FrontendBase):
|
class MetalGearArcadeFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.MGA
|
game: GameConstants = GameConstants.MGA
|
||||||
|
|
||||||
def __init__(self, data: Data, config: Config, cache: Cache) -> None:
|
def __init__(self, data: Data, config: Config, cache: Cache) -> None:
|
||||||
|
@ -16,7 +16,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class MusecaFrontend(FrontendBase):
|
class MusecaFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.MUSECA
|
game: GameConstants = GameConstants.MUSECA
|
||||||
|
|
||||||
valid_charts: List[int] = [
|
valid_charts: List[int] = [
|
||||||
|
@ -426,7 +426,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.POPN_MUSIC, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.POPN_MUSIC, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class PopnMusicFrontend(FrontendBase):
|
class PopnMusicFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.POPN_MUSIC
|
game: GameConstants = GameConstants.POPN_MUSIC
|
||||||
|
|
||||||
valid_charts: List[int] = [
|
valid_charts: List[int] = [
|
||||||
|
@ -452,7 +452,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.REFLEC_BEAT, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.REFLEC_BEAT, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ from bemani.frontend.base import FrontendBase
|
|||||||
|
|
||||||
|
|
||||||
class ReflecBeatFrontend(FrontendBase):
|
class ReflecBeatFrontend(FrontendBase):
|
||||||
|
|
||||||
game: GameConstants = GameConstants.REFLEC_BEAT
|
game: GameConstants = GameConstants.REFLEC_BEAT
|
||||||
|
|
||||||
version: int = 0 # We use a virtual version for ReflecBeat to tie charts together
|
version: int = 0 # We use a virtual version for ReflecBeat to tie charts together
|
||||||
|
@ -418,7 +418,7 @@ def searchrivals() -> Dict[str, Any]:
|
|||||||
|
|
||||||
matches = set()
|
matches = set()
|
||||||
profiles = g.data.remote.user.get_all_profiles(GameConstants.SDVX, version)
|
profiles = g.data.remote.user.get_all_profiles(GameConstants.SDVX, version)
|
||||||
for (userid, profile) in profiles:
|
for userid, profile in profiles:
|
||||||
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
if profile.extid == extid or profile.get_str("name").lower() == name.lower():
|
||||||
matches.add(userid)
|
matches.add(userid)
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user