1
0
mirror of synced 2024-11-27 15:30:49 +01:00

fix disable. Fix casing in options

This commit is contained in:
= 2024-06-30 12:54:44 +02:00
parent eb275062a1
commit 97e1d5da05
4 changed files with 21 additions and 21 deletions

View File

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

View File

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

View File

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

View File

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