Пример #1
0
def start_server_and_connect(parameters):
    info("active threads: %s", threading.enumerate())
    ServerInAThread(parameters).start()
    time.sleep(.01)  # Linux needs a small delay (at least on the Eee PC 4G)
    revision_checker.start_if_needed()
    connect_and_play()
    info("active threads: %s", threading.enumerate())
    sys.exit()
Пример #2
0
def start_server_and_connect(parameters):
    info("active threads: %s", threading.enumerate())
    ServerInAThread(parameters).start()
    time.sleep(.01) # Linux needs a small delay (at least on the Eee PC 4G)
    revision_checker.start_if_needed()
    connect_and_play()
    info("active threads: %s", threading.enumerate())
    sys.exit()
Пример #3
0
 def multiplayer_menu(self):
     revision_checker.start_if_needed()
     if config.login == "player":
         voice.alert([4235]) # type your new login
         self.modify_login()
     menu = Menu([4030], [
         ([4119], self.choose_server_ip_in_a_list),
         ([4120], self.enter_server_ip),
         ([4048], None),
          ])
     menu.run()
Пример #4
0
 def multiplayer_menu(self):
     revision_checker.start_if_needed()
     if config.login == "player":
         voice.alert([4235])  # type your new login
         self.modify_login()
     menu = Menu([4030], [
         ([4119], self.choose_server_ip_in_a_list),
         ([4120], self.enter_server_ip),
         ([4048], None),
     ])
     menu.run()
Пример #5
0
def start_server_and_connect(parameters):
    info("active threads: %s", threading.enumerate())
    ServerInAThread(parameters).start()
    # TODO: catch exceptions raised by the starting server
    # for example: RegisteringError ProbablyNoInternetError
    # voice.alert([4049]) # "The server couldn't probably register on the metaserver. check you are connected to the Internet."
    # voice.alert([4080]) # "failure: the server couldn't start"
    time.sleep(.01) # Linux needs a small delay (at least on the Eee PC 4G)
    revision_checker.start_if_needed()
    connect_and_play()
    info("active threads: %s", threading.enumerate())
    sys.exit()
Пример #6
0
def main():
    try:
        try:
            init_media()
            revision_checker.start_if_needed()
            Application().main()
        except SystemExit:
            raise
        except:
            exception("error")
    finally:
        close_media()
Пример #7
0
def start_server_and_connect(parameters):
    info("active threads: %s", threading.enumerate())
    ServerInAThread(parameters).start()
    # TODO: catch exceptions raised by the starting server
    # for example: RegisteringError ProbablyNoInternetError
    # voice.alert([4049]) # "The server couldn't probably register on the metaserver. check you are connected to the Internet."
    # voice.alert([4080]) # "failure: the server couldn't start"
    time.sleep(.01)  # Linux needs a small delay (at least on the Eee PC 4G)
    revision_checker.start_if_needed()
    connect_and_play()
    info("active threads: %s", threading.enumerate())
    sys.exit()
Пример #8
0
def main():
    try:
        try:
            init_media()
            revision_checker.start_if_needed()
            Application().main()
        except SystemExit:
            raise
        except:
            exception("error")
    finally:
        close_media()
Пример #9
0
def main():
    try:
        init_media()
        revision_checker.start_if_needed()
        if "connect_localhost" in sys.argv:
            connect_and_play()
        else:
            main_menu()
    except SystemExit:
        raise
    except:
        exception("error")
    finally:
        close_media()
Пример #10
0
def main():
    try:
        init_media()
        revision_checker.start_if_needed()
        if "connect_localhost" in sys.argv:
            connect_and_play()
        else:
            main_menu()
    except SystemExit:
        raise
    except:
        exception("error")
    finally:
        close_media()