diff --git a/cromulant/config.py b/cromulant/config.py index 1146eb9..20336ba 100644 --- a/cromulant/config.py +++ b/cromulant/config.py @@ -6,8 +6,9 @@ import appdirs # type: ignore class Config: - title: str = "Cromulant" - program: str = "cromulant" + program: str + title: str + version: str width: int = 820 height: int = 900 here: Path @@ -93,3 +94,6 @@ class Config: Config.logo_path = Config.here / "img" / "logo_3.jpg" Config.manifest = Storage.get_manifest() + Config.title = Config.manifest["title"] + Config.program = Config.manifest["program"] + Config.version = Config.manifest["version"] diff --git a/cromulant/game.py b/cromulant/game.py index 9dc05a4..543910f 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -430,8 +430,9 @@ class Game: @staticmethod def intro() -> None: - version = Config.manifest["version"] - Game.message(f"Welcome to Cromulant v{version}") + title = Config.title + version = Config.version + Game.message(f"Welcome to {title} v{version}") @staticmethod def menu() -> None: @@ -520,7 +521,7 @@ class Game: @staticmethod def about() -> None: lines = [ - f"Cromulant v{Config.manifest["version"]} {Config.ant}", + f"{Config.title} v{Config.version} {Config.ant}", "Listen to the ants and watch them go.", "Just run it and leave it open on your screen.", "5% of revenue goes to the local ant shelter.", diff --git a/cromulant/main.py b/cromulant/main.py index 5c5b5a4..088bf60 100644 --- a/cromulant/main.py +++ b/cromulant/main.py @@ -18,8 +18,8 @@ from .filter import Filter def main() -> None: Config.prepare() - program = Config.manifest["program"] - title = Config.manifest["title"] + program = Config.program + title = Config.title pid = f"{program}.pid" pid_file = Path(tempfile.gettempdir(), pid)