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: class Config:
title: str = "Cromulant" program: str
program: str = "cromulant" title: str
version: str
width: int = 820 width: int = 820
height: int = 900 height: int = 900
here: Path here: Path
@ -93,3 +94,6 @@ class Config:
Config.logo_path = Config.here / "img" / "logo_3.jpg" Config.logo_path = Config.here / "img" / "logo_3.jpg"
Config.manifest = Storage.get_manifest() 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 @staticmethod
def intro() -> None: def intro() -> None:
version = Config.manifest["version"] title = Config.title
Game.message(f"Welcome to Cromulant v{version}") version = Config.version
Game.message(f"Welcome to {title} v{version}")
@staticmethod @staticmethod
def menu() -> None: def menu() -> None:
@ -520,7 +521,7 @@ class Game:
@staticmethod @staticmethod
def about() -> None: def about() -> None:
lines = [ 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.", "Listen to the ants and watch them go.",
"Just run it and leave it open on your screen.", "Just run it and leave it open on your screen.",
"5% of revenue goes to the local ant shelter.", "5% of revenue goes to the local ant shelter.",

View File

@ -18,8 +18,8 @@ from .filter import Filter
def main() -> None: def main() -> None:
Config.prepare() Config.prepare()
program = Config.manifest["program"] program = Config.program
title = Config.manifest["title"] title = Config.title
pid = f"{program}.pid" pid = f"{program}.pid"
pid_file = Path(tempfile.gettempdir(), pid) pid_file = Path(tempfile.gettempdir(), pid)