configurable festa options

This commit is contained in:
= 2024-06-30 00:23:10 +02:00
parent 4a18f6b3bc
commit e0e63a9a13
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
## 20240620
### CHUNITHM
+ CHUNITHM LUMINOUS support

View File

@ -255,10 +255,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 |
| -------------------- | ------------------------------------------------------------------------------------------------ |
| `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 |
| `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)

View File

@ -1,6 +1,10 @@
server:
enable: True
loglevel: "info"
festaEnable: True
festaAddVP: "20,5"
festaMultiplyVP: "1,2"
festaEndTime: "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.festaEnable:
festa_end_time = self.game_config.server.festaEndTime
else:
festa_end_time = (datetime.datetime.now() + datetime.timedelta(days=365*2)).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.festaAddVP}",
"fi_mul_vp": f"{self.game_config.server.festaMultiplyVP}",
"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 festaEnable(self) -> bool:
return CoreConfig.get_config_field(
self.__config, "diva", "server", "festaEnable", default=True
)
@property
def festaAddVP(self) -> str:
return CoreConfig.get_config_field(
self.__config, "diva", "server", "festaAddVP", default="20,5"
)
@property
def festaMultiplyVP(self) -> str:
return CoreConfig.get_config_field(
self.__config, "diva", "server", "festaMultiplyVP", default="1,2"
)
@property
def festaEndTime(self) -> str:
return CoreConfig.get_config_field(
self.__config, "diva", "server", "festaEndTime", default="2029-01-01 00:00:00.0"
)
class DivaModsConfig:
def __init__(self, parent_config: "DivaConfig") -> None: