cardmaker: simplify handle_get_game_connect_api_request, add develop mode check
This commit is contained in:
parent
fb6a026b84
commit
2f1728b64d
@ -22,7 +22,10 @@ class CardMakerBase():
|
|||||||
self.version = CardMakerConstants.VER_CARD_MAKER
|
self.version = CardMakerConstants.VER_CARD_MAKER
|
||||||
|
|
||||||
def handle_get_game_connect_api_request(self, data: Dict) -> Dict:
|
def handle_get_game_connect_api_request(self, data: Dict) -> Dict:
|
||||||
|
if self.core_cfg.server.is_develop:
|
||||||
uri = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}"
|
uri = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}"
|
||||||
|
else:
|
||||||
|
f"http://{self.core_cfg.title.hostname}"
|
||||||
|
|
||||||
# CHUNITHM = 0, maimai = 1, ONGEKI = 2
|
# CHUNITHM = 0, maimai = 1, ONGEKI = 2
|
||||||
return {
|
return {
|
||||||
|
@ -17,29 +17,15 @@ class CardMaker136(CardMakerBase):
|
|||||||
self.version = CardMakerConstants.VER_CARD_MAKER_136
|
self.version = CardMakerConstants.VER_CARD_MAKER_136
|
||||||
|
|
||||||
def handle_get_game_connect_api_request(self, data: Dict) -> Dict:
|
def handle_get_game_connect_api_request(self, data: Dict) -> Dict:
|
||||||
|
ret = super().handle_get_game_connect_api_request(data)
|
||||||
|
if self.core_cfg.server.is_develop:
|
||||||
uri = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}"
|
uri = f"http://{self.core_cfg.title.hostname}:{self.core_cfg.title.port}"
|
||||||
|
else:
|
||||||
|
uri = f"http://{self.core_cfg.title.hostname}"
|
||||||
|
|
||||||
# CHUNITHM = 0, maimai = 1, ONGEKI = 2
|
ret["gameConnectList"][0]["titleUri"] = f"{uri}/SDHD/205/"
|
||||||
return {
|
ret["gameConnectList"][1]["titleUri"] = f"{uri}/SDEZ/125/"
|
||||||
"length": 3,
|
ret["gameConnectList"][2]["titleUri"] = f"{uri}/SDDT/135/"
|
||||||
"gameConnectList": [
|
|
||||||
{
|
|
||||||
"modelKind": 0,
|
|
||||||
"type": 1,
|
|
||||||
"titleUri": f"{uri}/SDHD/205/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"modelKind": 1,
|
|
||||||
"type": 1,
|
|
||||||
"titleUri": f"{uri}/SDEZ/125/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"modelKind": 2,
|
|
||||||
"type": 1,
|
|
||||||
"titleUri": f"{uri}/SDDT/135/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
def handle_get_game_setting_api_request(self, data: Dict) -> Dict:
|
def handle_get_game_setting_api_request(self, data: Dict) -> Dict:
|
||||||
ret = super().handle_get_game_setting_api_request(data)
|
ret = super().handle_get_game_setting_api_request(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user