forked from Dniel97/artemis
chuni: added teams and ticket saving, fixed last played song
This commit is contained in:
@ -21,6 +21,32 @@ class ChuniServerConfig:
|
||||
)
|
||||
|
||||
|
||||
class ChuniTeamConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
@property
|
||||
def team_name(self) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "team", "name", default=""
|
||||
)
|
||||
|
||||
|
||||
class ChuniVersionConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
|
||||
def version_rom(self, version: int) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "version", f"{version}", "rom", default="2.00.00"
|
||||
)
|
||||
|
||||
def version_data(self, version: int) -> str:
|
||||
return CoreConfig.get_config_field(
|
||||
self.__config, "chuni", "version", f"{version}", "data", default="2.00.00"
|
||||
)
|
||||
|
||||
|
||||
class ChuniCryptoConfig:
|
||||
def __init__(self, parent_config: "ChuniConfig") -> None:
|
||||
self.__config = parent_config
|
||||
@ -46,4 +72,6 @@ class ChuniCryptoConfig:
|
||||
class ChuniConfig(dict):
|
||||
def __init__(self) -> None:
|
||||
self.server = ChuniServerConfig(self)
|
||||
self.team = ChuniTeamConfig(self)
|
||||
self.version = ChuniVersionConfig(self)
|
||||
self.crypto = ChuniCryptoConfig(self)
|
||||
|
Reference in New Issue
Block a user