Added Buddies support
This commit is contained in:
parent
5491266a85
commit
9135433801
4
core/data/schema/versions/SDEZ_8_rollback.sql
Normal file
4
core/data/schema/versions/SDEZ_8_rollback.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE mai2_profile_detail DROP COLUMN currentPlayCount;
|
||||||
|
ALTER TABLE mai2_profile_detail DROP COLUMN renameCredit;
|
||||||
|
|
||||||
|
ALTER TABLE mai2_playlog DROP COLUMN extBool1;
|
4
core/data/schema/versions/SDEZ_9_upgrade.sql
Normal file
4
core/data/schema/versions/SDEZ_9_upgrade.sql
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE mai2_profile_detail ADD currentPlayCount INT NULL;
|
||||||
|
ALTER TABLE mai2_profile_detail ADD renameCredit INT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE mai2_playlog ADD extBool1 BOOLEAN NULL;
|
@ -207,6 +207,7 @@ Config file is located in `config/cxb.yaml`.
|
|||||||
| SDEZ | 18 | maimai DX UNiVERSE PLUS |
|
| SDEZ | 18 | maimai DX UNiVERSE PLUS |
|
||||||
| SDEZ | 19 | maimai DX FESTiVAL |
|
| SDEZ | 19 | maimai DX FESTiVAL |
|
||||||
| SDEZ | 20 | maimai DX FESTiVAL PLUS |
|
| SDEZ | 20 | maimai DX FESTiVAL PLUS |
|
||||||
|
| SDEZ | 21 | maimai DX BUDDiES |
|
||||||
|
|
||||||
### Importer
|
### Importer
|
||||||
|
|
||||||
@ -421,6 +422,7 @@ After that, on next login the present should be received (or whenever it suppose
|
|||||||
* UNiVERSE PLUS: Yes
|
* UNiVERSE PLUS: Yes
|
||||||
* FESTiVAL: Yes (added in A031)
|
* FESTiVAL: Yes (added in A031)
|
||||||
* FESTiVAL PLUS: Yes (added in A035)
|
* FESTiVAL PLUS: Yes (added in A035)
|
||||||
|
* BUDDiES: Yes
|
||||||
* O.N.G.E.K.I. bright MEMORY: Yes
|
* O.N.G.E.K.I. bright MEMORY: Yes
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ Games listed below have been tested and confirmed working. Only game versions ol
|
|||||||
+ All versions + omnimix
|
+ All versions + omnimix
|
||||||
|
|
||||||
+ maimai DX
|
+ maimai DX
|
||||||
+ All versions up to FESTiVAL PLUS
|
+ All versions up to BUDDiES
|
||||||
|
|
||||||
+ Hatsune Miku: Project DIVA Arcade
|
+ Hatsune Miku: Project DIVA Arcade
|
||||||
+ All versions
|
+ All versions
|
||||||
|
@ -206,6 +206,7 @@ class CardMakerReader(BaseReader):
|
|||||||
"1.25": Mai2Constants.VER_MAIMAI_DX_UNIVERSE_PLUS,
|
"1.25": Mai2Constants.VER_MAIMAI_DX_UNIVERSE_PLUS,
|
||||||
"1.30": Mai2Constants.VER_MAIMAI_DX_FESTIVAL,
|
"1.30": Mai2Constants.VER_MAIMAI_DX_FESTIVAL,
|
||||||
"1.35": Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS,
|
"1.35": Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS,
|
||||||
|
"1.40": Mai2Constants.VER_MAIMAI_DX_BUDDIES,
|
||||||
}
|
}
|
||||||
|
|
||||||
for root, dirs, files in os.walk(base_dir):
|
for root, dirs, files in os.walk(base_dir):
|
||||||
|
@ -16,4 +16,4 @@ game_codes = [
|
|||||||
Mai2Constants.GAME_CODE_GREEN,
|
Mai2Constants.GAME_CODE_GREEN,
|
||||||
Mai2Constants.GAME_CODE,
|
Mai2Constants.GAME_CODE,
|
||||||
]
|
]
|
||||||
current_schema_version = 8
|
current_schema_version = 9
|
||||||
|
19
titles/mai2/buddies.py
Normal file
19
titles/mai2/buddies.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
from typing import Dict
|
||||||
|
|
||||||
|
from core.config import CoreConfig
|
||||||
|
from titles.mai2.festivalplus import Mai2FestivalPlus
|
||||||
|
from titles.mai2.const import Mai2Constants
|
||||||
|
from titles.mai2.config import Mai2Config
|
||||||
|
|
||||||
|
|
||||||
|
class Mai2Buddies(Mai2FestivalPlus):
|
||||||
|
def __init__(self, cfg: CoreConfig, game_cfg: Mai2Config) -> None:
|
||||||
|
super().__init__(cfg, game_cfg)
|
||||||
|
self.version = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
||||||
|
|
||||||
|
def handle_cm_get_user_preview_api_request(self, data: Dict) -> Dict:
|
||||||
|
user_data = super().handle_cm_get_user_preview_api_request(data)
|
||||||
|
|
||||||
|
# hardcode lastDataVersion for CardMaker
|
||||||
|
user_data["lastDataVersion"] = "1.40.00"
|
||||||
|
return user_data
|
@ -53,6 +53,7 @@ class Mai2Constants:
|
|||||||
VER_MAIMAI_DX_UNIVERSE_PLUS = 18
|
VER_MAIMAI_DX_UNIVERSE_PLUS = 18
|
||||||
VER_MAIMAI_DX_FESTIVAL = 19
|
VER_MAIMAI_DX_FESTIVAL = 19
|
||||||
VER_MAIMAI_DX_FESTIVAL_PLUS = 20
|
VER_MAIMAI_DX_FESTIVAL_PLUS = 20
|
||||||
|
VER_MAIMAI_DX_BUDDIES = 21
|
||||||
|
|
||||||
VERSION_STRING = (
|
VERSION_STRING = (
|
||||||
"maimai",
|
"maimai",
|
||||||
@ -76,6 +77,7 @@ class Mai2Constants:
|
|||||||
"maimai DX UNiVERSE PLUS",
|
"maimai DX UNiVERSE PLUS",
|
||||||
"maimai DX FESTiVAL",
|
"maimai DX FESTiVAL",
|
||||||
"maimai DX FESTiVAL PLUS",
|
"maimai DX FESTiVAL PLUS",
|
||||||
|
"maimai DX BUDDiES",
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -25,6 +25,7 @@ from .universe import Mai2Universe
|
|||||||
from .universeplus import Mai2UniversePlus
|
from .universeplus import Mai2UniversePlus
|
||||||
from .festival import Mai2Festival
|
from .festival import Mai2Festival
|
||||||
from .festivalplus import Mai2FestivalPlus
|
from .festivalplus import Mai2FestivalPlus
|
||||||
|
from .buddies import Mai2Buddies
|
||||||
|
|
||||||
|
|
||||||
class Mai2Servlet(BaseServlet):
|
class Mai2Servlet(BaseServlet):
|
||||||
@ -58,6 +59,7 @@ class Mai2Servlet(BaseServlet):
|
|||||||
Mai2UniversePlus,
|
Mai2UniversePlus,
|
||||||
Mai2Festival,
|
Mai2Festival,
|
||||||
Mai2FestivalPlus,
|
Mai2FestivalPlus,
|
||||||
|
Mai2Buddies,
|
||||||
]
|
]
|
||||||
|
|
||||||
self.logger = logging.getLogger("mai2")
|
self.logger = logging.getLogger("mai2")
|
||||||
@ -252,8 +254,10 @@ class Mai2Servlet(BaseServlet):
|
|||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_UNIVERSE_PLUS
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_UNIVERSE_PLUS
|
||||||
elif version >= 130 and version < 135: # FESTiVAL
|
elif version >= 130 and version < 135: # FESTiVAL
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL
|
||||||
elif version >= 135: # FESTiVAL PLUS
|
elif version >= 135 and version < 140: # FESTiVAL PLUS
|
||||||
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_FESTIVAL_PLUS
|
||||||
|
elif version >= 140: # BUDDiES
|
||||||
|
internal_ver = Mai2Constants.VER_MAIMAI_DX_BUDDIES
|
||||||
|
|
||||||
if (
|
if (
|
||||||
request.getHeader("Mai-Encoding") is not None
|
request.getHeader("Mai-Encoding") is not None
|
||||||
|
@ -40,6 +40,8 @@ detail = Table(
|
|||||||
Column("charaLockSlot", JSON),
|
Column("charaLockSlot", JSON),
|
||||||
Column("contentBit", BigInteger),
|
Column("contentBit", BigInteger),
|
||||||
Column("playCount", Integer),
|
Column("playCount", Integer),
|
||||||
|
Column("currentPlayCount", Integer), # new with bud
|
||||||
|
Column("renameCredit", Integer), # new with bud
|
||||||
Column("mapStock", Integer), # new with fes+
|
Column("mapStock", Integer), # new with fes+
|
||||||
Column("eventWatchedDate", String(25)),
|
Column("eventWatchedDate", String(25)),
|
||||||
Column("lastGameId", String(25)),
|
Column("lastGameId", String(25)),
|
||||||
|
@ -146,6 +146,7 @@ playlog = Table(
|
|||||||
Column("extNum1", Integer),
|
Column("extNum1", Integer),
|
||||||
Column("extNum2", Integer),
|
Column("extNum2", Integer),
|
||||||
Column("extNum4", Integer, server_default="0"),
|
Column("extNum4", Integer, server_default="0"),
|
||||||
|
Column("extBool1", Boolean), # new with bud
|
||||||
Column("trialPlayAchievement", Integer),
|
Column("trialPlayAchievement", Integer),
|
||||||
mysql_charset="utf8mb4",
|
mysql_charset="utf8mb4",
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user