pocket-friends/pocket_friends/__main__.py

28 lines
670 B
Python
Raw Normal View History

"""
Launch script for Pocket Friends.
"""
import os
import pygame
import sys
2023-05-11 11:24:42 -04:00
from pathlib import Path
import pocket_friends.game as game
if __name__ == '__main__':
enable_dev = False
resolution = 240
if len(sys.argv) > 0:
for arg in sys.argv:
if arg == '--delete-save':
save_dir = os.path.join(Path.home(), '.pocket_friends')
os.remove(save_dir + '/save.json')
if '--res=' in arg:
resolution = int(arg.split('=')[1])
if arg == '--dev':
enable_dev = True
game.start_game(resolution=resolution, dev=enable_dev)
pygame.quit()
sys.exit()