pushing news support customization for chunithm
This commit is contained in:
parent
1996f3f356
commit
bfaadff9f6
@ -65,6 +65,7 @@ Config file is located in `config/chuni.yaml`.
|
||||
|
||||
| Option | Info |
|
||||
|------------------|----------------------------------------------------------------------------------------------------------------|
|
||||
| `news_msg` | If this is set, the news at the top of the main screen will be displayed (up to Chunithm Paradise Lost) |
|
||||
| `name` | If this is set, all players that are not on a team will use this one by default. |
|
||||
| `rank_scale` | Scales the in-game ranking based on the number of teams within the database |
|
||||
| `use_login_bonus`| This is used to enable the login bonuses |
|
||||
|
@ -1,6 +1,7 @@
|
||||
server:
|
||||
enable: True
|
||||
loglevel: "info"
|
||||
news_msg: ""
|
||||
|
||||
team:
|
||||
name: ARTEMiS # If this is set, all players that are not on a team will use this one by default.
|
||||
|
@ -181,7 +181,17 @@ class ChuniBase:
|
||||
return {"type": data["type"], "length": 0, "gameIdlistList": []}
|
||||
|
||||
def handle_get_game_message_api_request(self, data: Dict) -> Dict:
|
||||
return {"type": data["type"], "length": "0", "gameMessageList": []}
|
||||
return {
|
||||
"type": data["type"],
|
||||
"length": 1,
|
||||
"gameMessageList": [{
|
||||
"id": 1,
|
||||
"type": 1,
|
||||
"message": f"Welcome to {self.core_cfg.server.name} network!" if not self.game_config.server.news_msg else self.game_config.server.news_msg,
|
||||
"startDate": "2017-12-05 07:00:00.0",
|
||||
"endDate": "2099-12-31 00:00:00.0"
|
||||
}]
|
||||
}
|
||||
|
||||
def handle_get_game_ranking_api_request(self, data: Dict) -> Dict:
|
||||
return {"type": data["type"], "gameRankingList": []}
|
||||
|
@ -19,6 +19,12 @@ class ChuniServerConfig:
|
||||
self.__config, "chuni", "server", "loglevel", default="info"
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def news_msg(self) -> str:
|
||||
CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "server", "news_msg", default=""
|
||||
)
|
||||
|
||||
|
||||
class ChuniTeamConfig:
|
||||
|
Loading…
Reference in New Issue
Block a user