This commit is contained in:
Auric Vente 2024-07-22 23:26:11 -06:00
parent 61403f0419
commit 8b96769a6b
3 changed files with 12 additions and 7 deletions

View File

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

View File

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

View File

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