2021-05-29 20:08:15 -04:00
|
|
|
"""
|
|
|
|
Launch script for Pocket Friends.
|
|
|
|
"""
|
2021-06-12 22:06:48 -04:00
|
|
|
import os
|
|
|
|
from pathlib import Path
|
2021-05-29 20:08:15 -04:00
|
|
|
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
|
|
|
|
|
2021-05-29 22:17:22 -04:00
|
|
|
if __name__ == '__main__':
|
2021-05-29 20:08:15 -04:00
|
|
|
enable_dev = False
|
|
|
|
|
2021-05-29 21:42:33 -04:00
|
|
|
# enable dev mode if --dev argument is passed
|
|
|
|
if len(sys.argv) > 0:
|
2023-01-26 15:17:09 -05:00
|
|
|
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')
|
2021-06-12 22:06:48 -04:00
|
|
|
|
2023-01-26 15:17:09 -05:00
|
|
|
game_main()
|
2021-05-29 20:08:15 -04:00
|
|
|
|
2021-05-29 21:42:33 -04:00
|
|
|
pygame.quit()
|
|
|
|
sys.exit()
|