1
0
forked from Hay1tsme/artemis

Merge pull request 'DIVA made some festa stuff configurable in config' (#161) from ThatzOkay/artemis:diva_configire_festa into develop

Reviewed-on: Hay1tsme/artemis#161
This commit is contained in:
Hay1tsme 2024-07-06 00:47:42 +00:00
commit 51a47e51d9
5 changed files with 47 additions and 7 deletions

View File

@ -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

View File

@ -270,7 +270,11 @@ the Shop, Modules and Customizations.
Config file is located in `config/diva.yaml`.
| 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 |

View File

@ -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

View File

@ -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}",
}

View File

@ -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: