diff --git a/changelog.md b/changelog.md index 8f60130..196f3fd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ # Changelog Documenting updates to ARTEMiS, to be updated every time the master branch is pushed to. +## 20240630 +### DIVA ++ Added configurable festa options' + ## 20240629 ### CHUNITHM + Add team points diff --git a/docs/game_specific_info.md b/docs/game_specific_info.md index 9fadf80..33d5710 100644 --- a/docs/game_specific_info.md +++ b/docs/game_specific_info.md @@ -269,10 +269,14 @@ the Shop, Modules and Customizations. Config file is located in `config/diva.yaml`. -| Option | Info | -| -------------------- | ----------------------------------------------------------------------------------------------- | -| `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 | +| Option | Info | +| -------------------- | ------------------------------------------------------------------------------------------------ | +| `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 | ### Custom PV Lists (databanks) diff --git a/example_config/diva.yaml b/example_config/diva.yaml index ad1842a..7b8bdcb 100644 --- a/example_config/diva.yaml +++ b/example_config/diva.yaml @@ -1,6 +1,10 @@ server: enable: True loglevel: "info" + 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 3b96848..be7a241 100644 --- a/titles/diva/base.py +++ b/titles/diva/base.py @@ -264,6 +264,11 @@ class DivaBase: return response async def handle_festa_info_request(self, data: Dict) -> Dict: + 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)).strftime("%Y-%m-%d %H:%M:%S") + ".0" + encoded = "&" params = { "fi_id": "1,2", @@ -273,10 +278,10 @@ class DivaBase: "fi_difficulty": "-1,-1", "fi_pv_id_lst": "ALL,ALL", "fi_attr": "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", - "fi_add_vp": "20,5", - "fi_mul_vp": "1,2", + "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": "2029-01-01 00:00:00.0,2029-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 efa327e..48b5c0f 100644 --- a/titles/diva/config.py +++ b/titles/diva/config.py @@ -19,6 +19,29 @@ class DivaServerConfig: ) ) + @property + def festa_enable(self) -> bool: + return CoreConfig.get_config_field( + self.__config, "diva", "server", "festa_enable", default=True + ) + + @property + def festa_add_VP(self) -> str: + return CoreConfig.get_config_field( + self.__config, "diva", "server", "festa_add_VP", default="20,5" + ) + + @property + def festa_multiply_VP(self) -> str: + return CoreConfig.get_config_field( + self.__config, "diva", "server", "festa_multiply_VP", default="1,2" + ) + + @property + def festa_end_time(self) -> str: + return CoreConfig.get_config_field( + self.__config, "diva", "server", "festa_end_time", default="2029-01-01 00:00:00.0" + ) class DivaModsConfig: def __init__(self, parent_config: "DivaConfig") -> None: