From 97e1d5da058953491cc71cd54359e4cfdbbb2bda Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 30 Jun 2024 12:54:44 +0200 Subject: [PATCH] fix disable. Fix casing in options --- docs/game_specific_info.md | 8 ++++---- example_config/diva.yaml | 8 ++++---- titles/diva/base.py | 10 +++++----- titles/diva/config.py | 16 ++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index ecd92e2..33d5710 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -271,10 +271,10 @@ Config file is located in `config/diva.yaml`. | Option | Info | | -------------------- | ------------------------------------------------------------------------------------------------ | -| `festaEnable` | Enable or disable the ingame festa | -| `festaAddVP` | Set the extra VP you get when clearing a song, if festa is not enabled no extra VP will be given | -| `festaMultiplyVP` | Multiplier for festa add VP | -| `festaEndTime` | Set the date time for when festa will end and not show up in game anymore | +| `festa_enable` | Enable or disable the ingame festa | +| `festa_add_VP` | Set the extra VP you get when clearing a song, if festa is not enabled no extra VP will be given | +| `festa_multiply_VP` | Multiplier for festa add VP | +| `festa_end_time` | Set the date time for when festa will end and not show up in game anymore | | `unlock_all_modules` | Unlocks all modules (costumes) by default, if set to `False` all modules need to be purchased | | `unlock_all_items` | Unlocks all items (customizations) by default, if set to `False` all items need to be purchased | diff --git a/example_config/diva.yaml b/example_config/diva.yaml index 465ab93..7b8bdcb 100644 --- a/example_config/diva.yaml +++ b/example_config/diva.yaml @@ -1,10 +1,10 @@ server: enable: True loglevel: "info" - festaEnable: True - festaAddVP: "20,5" - festaMultiplyVP: "1,2" - festaEndTime: "2029-01-01 00:00:00.0" + festa_enable: True + festa_add_VP: "20,5" + festa_multiply_VP: "1,2" + festa_end_time: "2029-01-01 00:00:00.0" mods: unlock_all_modules: True diff --git a/titles/diva/base.py b/titles/diva/base.py index e07c81d..be7a241 100644 --- a/titles/diva/base.py +++ b/titles/diva/base.py @@ -264,10 +264,10 @@ class DivaBase: return response async def handle_festa_info_request(self, data: Dict) -> Dict: - if self.game_config.server.festaEnable: - festa_end_time = self.game_config.server.festaEndTime + if self.game_config.server.festa_enable: + festa_end_time = self.game_config.server.festa_end_time else: - festa_end_time = (datetime.datetime.now() + datetime.timedelta(days=365*2)).strftime("%Y-%m-%d %H:%M:%S") + ".0" + festa_end_time = (datetime.datetime.now() - datetime.timedelta(days=365)).strftime("%Y-%m-%d %H:%M:%S") + ".0" encoded = "&" params = { @@ -278,8 +278,8 @@ class DivaBase: "fi_difficulty": "-1,-1", "fi_pv_id_lst": "ALL,ALL", "fi_attr": "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "fi_add_vp": f"{self.game_config.server.festaAddVP}", - "fi_mul_vp": f"{self.game_config.server.festaMultiplyVP}", + "fi_add_vp": f"{self.game_config.server.festa_add_VP}", + "fi_mul_vp": f"{self.game_config.server.festa_multiply_VP}", "fi_st": "2019-01-01 00:00:00.0,2019-01-01 00:00:00.0", "fi_et": f"{festa_end_time},{festa_end_time}", "fi_lut": "{self.time_lut}", diff --git a/titles/diva/config.py b/titles/diva/config.py index 269041a..48b5c0f 100644 --- a/titles/diva/config.py +++ b/titles/diva/config.py @@ -20,27 +20,27 @@ class DivaServerConfig: ) @property - def festaEnable(self) -> bool: + def festa_enable(self) -> bool: return CoreConfig.get_config_field( - self.__config, "diva", "server", "festaEnable", default=True + self.__config, "diva", "server", "festa_enable", default=True ) @property - def festaAddVP(self) -> str: + def festa_add_VP(self) -> str: return CoreConfig.get_config_field( - self.__config, "diva", "server", "festaAddVP", default="20,5" + self.__config, "diva", "server", "festa_add_VP", default="20,5" ) @property - def festaMultiplyVP(self) -> str: + def festa_multiply_VP(self) -> str: return CoreConfig.get_config_field( - self.__config, "diva", "server", "festaMultiplyVP", default="1,2" + self.__config, "diva", "server", "festa_multiply_VP", default="1,2" ) @property - def festaEndTime(self) -> str: + def festa_end_time(self) -> str: return CoreConfig.get_config_field( - self.__config, "diva", "server", "festaEndTime", default="2029-01-01 00:00:00.0" + self.__config, "diva", "server", "festa_end_time", default="2029-01-01 00:00:00.0" ) class DivaModsConfig: