add prism+ consts and cm support
This commit is contained in:
@ -208,7 +208,8 @@ class CardMakerReader(BaseReader):
|
|||||||
"1.35": Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS,
|
"1.35": Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS,
|
||||||
"1.40": Mai2Constants.VER_MAIMAI_DX_BUDDIES,
|
"1.40": Mai2Constants.VER_MAIMAI_DX_BUDDIES,
|
||||||
"1.45": Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
"1.45": Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
||||||
"1.50": Mai2Constants.VER_MAIMAI_DX_PRISM
|
"1.50": Mai2Constants.VER_MAIMAI_DX_PRISM,
|
||||||
|
"1.55": Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS
|
||||||
}
|
}
|
||||||
|
|
||||||
for root, dirs, files in os.walk(base_dir):
|
for root, dirs, files in os.walk(base_dir):
|
||||||
|
@ -57,6 +57,7 @@ class Mai2Constants:
|
|||||||
VER_MAIMAI_DX_BUDDIES = 21
|
VER_MAIMAI_DX_BUDDIES = 21
|
||||||
VER_MAIMAI_DX_BUDDIES_PLUS = 22
|
VER_MAIMAI_DX_BUDDIES_PLUS = 22
|
||||||
VER_MAIMAI_DX_PRISM = 23
|
VER_MAIMAI_DX_PRISM = 23
|
||||||
|
VER_MAIMAI_DX_PRISM_PLUS = 24
|
||||||
|
|
||||||
VERSION_STRING = (
|
VERSION_STRING = (
|
||||||
"maimai",
|
"maimai",
|
||||||
@ -82,7 +83,8 @@ class Mai2Constants:
|
|||||||
"maimai DX FESTiVAL PLUS",
|
"maimai DX FESTiVAL PLUS",
|
||||||
"maimai DX BUDDiES",
|
"maimai DX BUDDiES",
|
||||||
"maimai DX BUDDiES PLUS",
|
"maimai DX BUDDiES PLUS",
|
||||||
"maimai DX PRiSM"
|
"maimai DX PRiSM",
|
||||||
|
"maimai DX PRiSM PLUS"
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -32,6 +32,7 @@ from .festivalplus import Mai2FestivalPlus
|
|||||||
from .buddies import Mai2Buddies
|
from .buddies import Mai2Buddies
|
||||||
from .buddiesplus import Mai2BuddiesPlus
|
from .buddiesplus import Mai2BuddiesPlus
|
||||||
from .prism import Mai2Prism
|
from .prism import Mai2Prism
|
||||||
|
from .prismplus import Mai2PrismPlus
|
||||||
|
|
||||||
|
|
||||||
class Mai2Servlet(BaseServlet):
|
class Mai2Servlet(BaseServlet):
|
||||||
@ -68,7 +69,8 @@ class Mai2Servlet(BaseServlet):
|
|||||||
Mai2FestivalPlus,
|
Mai2FestivalPlus,
|
||||||
Mai2Buddies,
|
Mai2Buddies,
|
||||||
Mai2BuddiesPlus,
|
Mai2BuddiesPlus,
|
||||||
Mai2Prism
|
Mai2Prism,
|
||||||
|
Mai2PrismPlus
|
||||||
]
|
]
|
||||||
|
|
||||||
self.logger = logging.getLogger("mai2")
|
self.logger = logging.getLogger("mai2")
|
||||||
@ -308,10 +310,12 @@ class Mai2Servlet(BaseServlet):
|
|||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
||||||
elif version >= 140 and version < 145: # BUDDiES
|
elif version >= 140 and version < 145: # BUDDiES
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
||||||
elif version >= 145 and version <150: # BUDDiES PLUS
|
elif version >= 145 and version < 150: # BUDDiES PLUS
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
||||||
elif version >=150:
|
elif version >= 150 and version < 155:
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
|
||||||
|
elif version >= 155:
|
||||||
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS
|
||||||
|
|
||||||
elif game_code == "SDGA": # Int
|
elif game_code == "SDGA": # Int
|
||||||
if version < 105: # 1.0
|
if version < 105: # 1.0
|
||||||
@ -332,10 +336,12 @@ class Mai2Servlet(BaseServlet):
|
|||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
||||||
elif version >= 140 and version < 145: # BUDDiES
|
elif version >= 140 and version < 145: # BUDDiES
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
||||||
elif version >= 145 and version <150: # BUDDiES PLUS
|
elif version >= 145 and version < 150: # BUDDiES PLUS
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES_PLUS,
|
||||||
elif version >=150:
|
elif version >= 150 and version < 155:
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM
|
||||||
|
elif version >= 155:
|
||||||
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS
|
||||||
|
|
||||||
if all(c in string.hexdigits for c in endpoint) and len(endpoint) == 32:
|
if all(c in string.hexdigits for c in endpoint) and len(endpoint) == 32:
|
||||||
# If we get a 32 character long hex string, it's a hash and we're
|
# If we get a 32 character long hex string, it's a hash and we're
|
||||||
|
22
titles/mai2/prismplus.py
Normal file
22
titles/mai2/prismplus.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from typing import Dict
|
||||||
|
|
||||||
|
from core.config import CoreConfig
|
||||||
|
from titles.mai2.prism import Mai2Prism
|
||||||
|
from titles.mai2.const import Mai2Constants
|
||||||
|
from titles.mai2.config import Mai2Config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Mai2PrismPlus(Mai2Prism):
|
||||||
|
def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None:
|
||||||
|
super().__init__(cfg, game_cfg)
|
||||||
|
self.version = Mai2Constants.VER_MAIMAI_DX_PRISM_PLUS
|
||||||
|
|
||||||
|
async def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict:
|
||||||
|
user_data = await super().handle_cm_get_user_preview_api_request(data)
|
||||||
|
|
||||||
|
# hardcode lastDataVersion for CardMaker
|
||||||
|
user_data["lastDataVersion"] = "1.55.00"
|
||||||
|
return user_data
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user