summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.py b/main.py
index d07b6b8..b9fc832 100644
--- a/main.py
+++ b/main.py
@@ -7,12 +7,21 @@ import sys
import math
import time
import random
-import gui
+import nogui as gui # might be overridden later.
import stats
from subscriber import EnhancingSubscriber
from interval_utils import *
from strategy import *
+if "--nogui" in sys.argv:
+ sys.argv.remove("--nogui")
+else:
+ try:
+ import gui
+ except:
+ print("ERROR: could not import gui... running without gui.")
+
+
# global vars
sub = EnhancingSubscriber()
c = client.Client(sub)
@@ -53,7 +62,7 @@ c.player.nick=nick
gui.set_client(c)
# initialize strategy
-strategy = Strategy(c)
+strategy = Strategy(c, gui)
autorespawn_counter = 60