3
2
forked from Dniel97/artemis
artemis/titles/FGOA/config.py

25 lines
643 B
Python
Raw Permalink Normal View History

2024-04-01 19:00:15 +00:00
from core.config import CoreConfig
class FGOAServerConfig:
def __init__(self, parent: "FGOAConfig") -> None:
self.__config = parent
@property
def enable(self) -> bool:
return CoreConfig.get_config_field(
self.__config, "fgo", "server", "enable", default=True
)
@property
def loglevel(self) -> int:
return CoreConfig.str_to_loglevel(
CoreConfig.get_config_field(
self.__config, "fgo", "server", "loglevel", default="info"
)
)
class FGOAConfig(dict):
def __init__(self) -> None:
self.server = FGOAServerConfig(self)