|
|
|
@ -226,6 +226,7 @@ class mutant(QWidget): |
|
|
|
self.na_thresh = 150 |
|
|
|
self.status = "" |
|
|
|
self.area = "" |
|
|
|
self.console_lines = 0 |
|
|
|
|
|
|
|
#account |
|
|
|
self.user = user |
|
|
|
@ -908,7 +909,10 @@ class mutant(QWidget): |
|
|
|
pass |
|
|
|
year_str = year_str[:end_index] |
|
|
|
#print("Year:" + year_str) |
|
|
|
self.farm_year = int(year_str) |
|
|
|
try: |
|
|
|
self.farm_year = int(year_str) |
|
|
|
except: |
|
|
|
pass |
|
|
|
self.status = "" |
|
|
|
|
|
|
|
#index area |
|
|
|
@ -1453,17 +1457,31 @@ class mutant(QWidget): |
|
|
|
self.command_str.emit(str(self.char_sel)+"\r\n") |
|
|
|
#self.mutants() |
|
|
|
self.logged_in = True |
|
|
|
#doesnt work yet |
|
|
|
def delete_line(self,line): |
|
|
|
cursor = self.console.textCursor() |
|
|
|
cursor.movePosition(QTextCursor.Start + line + 1) |
|
|
|
cursor.movePosition( |
|
|
|
QTextCursor.PreviousBlock, |
|
|
|
QTextCursor.KeepAnchor, 1) |
|
|
|
cursor.removeSelectedText() |
|
|
|
self.console.setTextCursor(cursor) |
|
|
|
|
|
|
|
#main game loop |
|
|
|
def execute_loop(self, result): |
|
|
|
self.console.append(result) |
|
|
|
self.console.moveCursor(QTextCursor.End) |
|
|
|
|
|
|
|
self.console_lines = self.console_lines +1 |
|
|
|
|
|
|
|
if self.logged_in == False: |
|
|
|
self.login_listener(result) |
|
|
|
else: |
|
|
|
self.mutants(result) |
|
|
|
|
|
|
|
if self.console_lines>5000: |
|
|
|
self.console.clear() |
|
|
|
self.console_lines = 0 |
|
|
|
|
|
|
|
self.console.moveCursor(QTextCursor.End) |
|
|
|
|
|
|
|
class telnet_thread(QObject): |
|
|
|
received = pyqtSignal(str) |
|
|
|
|