pocket-friends/pocket_friends/__main__.py

26 lines
633 B
Python

"""
Launch script for Pocket Friends.
"""
import os
from pathlib import Path
import pygame
import sys
from pocket_friends.game_files.game import main as game_main
from pocket_friends.development.dev_menu import main as dev_menu_main
if __name__ == '__main__':
enable_dev = False
# enable dev mode if --dev argument is passed
if len(sys.argv) > 0:
for arg in sys.argv:
match arg:
case '--delete-save':
save_dir = os.path.join(Path.home(), '.pocket_friends')
os.remove(save_dir + '/save.json')
game_main()
pygame.quit()
sys.exit()