From 1cbf9ef2afc9057ad8012ac11bd86ccc2b58f25d Mon Sep 17 00:00:00 2001 From: Brosef Date: Sun, 22 Jun 2025 17:33:20 +0100 Subject: [PATCH] Added initaliser for players.json --- setup.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 265d631..75d4d14 100644 --- a/setup.py +++ b/setup.py @@ -65,4 +65,13 @@ for path in os.listdir('../'): print(f'{path} does not have a requirements.txt, skipping...') continue - installRequirements(requirementsPath) \ No newline at end of file + installRequirements(requirementsPath) + +if os.path.isfile('../players.json'): + newPlayerJSON = inputYN(f'player.json already exists, would you like to overwrite it? (y/n) > ') +else: + newPlayerJSON = True + +if newPlayerJSON: + print(f'---------- Copying example players.json ----------') + shutil.copyfile('../NoPELib/players.json', '../players.json') \ No newline at end of file