forked from Factorio-Access/FactorioAccess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·68 lines (58 loc) · 2.01 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python3
import sys
import traceback
sys.excepthook = lambda *args: (traceback.print_exception(*args), input("Press Enter to Exit"))
import os
import fa_paths
import multiplayer
from fa_menu import *
import modify_config
import launch_and_monitor
import save_management
from fa_arg_parse import args
from map_gen_setting_menu import sub_preset
from translations import check_lang
from fa_scenarios import get_scenarios,pre_launch_scenario
os.chdir(fa_paths.MY_CONFIG_DIR)
menu = {
"Launch last played":launch_and_monitor.just_launch,
("gui-menu.single-player-menu",):{
("gui-menu.new-game",): {
("gui-new-game.main-game",):sub_preset,
("gui-new-game.mod-scenarios",):{
get_scenarios:pre_launch_scenario
}
},
("gui-menu.load-game",) : {
save_management.get_menu_saved_games:launch_and_monitor.launch,
},
},
("gui-menu.multi-player-menu",):{
multiplayer.get_username_menu:multiplayer.username_menu,
"Host Settings":{
multiplayer.get_host_settings_menu:multiplayer.run_func
},
("gui-menu.host-saved-game",): {
save_management.get_menu_saved_games: multiplayer.multiplayer_host,
},
("gui-menu.browse-public-games",):{
"Friend List":{
"Add":multiplayer.add_friend_menu,
multiplayer.get_friends_menu: multiplayer.specific_friend_menu
},
"List Games With Friends":{
multiplayer.games_with_friends_menu: multiplayer.multiplayer_join
}
},
("gui-menu.connect-to-address",): launch_and_monitor.connect_to_address_menu,
},
("gui.exit",): launch_and_monitor.time_to_exit,
}
check_lang()
modify_config.do_config_check()
if args.launch:
launch_and_monitor.launch_with_params([],save_rename=False)
else:
my_main_menu = menu_item(("gui-menu.main-menu",),menu,None,False)
my_main_menu()
#do_menu(menu,"Main Menu",False)