Browse Source

12/23/2022

BradDev
Joe DiPrima 3 years ago
parent
commit
86ebc2e4e8
  1. 27
      qmutants.py

27
qmutants.py

@ -21,28 +21,34 @@ if choice == 1:
usr_1 = "epilectrik"
pwrd_1 = "gupass"
char_sel_1 = 4
weapon_1 = "Plasma-Sword"
usr_2 = "im bait"
pwrd_2 = "gupass"
char_sel_2 = 4
weapon_2 = "Plasma-Sword"
if choice == 2:
usr_1 = "Mtron"
pwrd_1 = "gupass"
char_sel_1 = 4
weapon_1 = "Plasma-Sword"
usr_2 = "IonJunkies-Merc"
pwrd_2 = "gupass"
char_sel_2 = 4
weapon_2 = "Plasma-Sword"
if choice == 3:
usr_1 = "doctor"
pwrd_1 = "gupass"
char_sel_1 = 2
weapon_1 = "Nuclear-Decay"
usr_2 = "robin-hood"
pwrd_2 = "gupass"
char_sel_2 = 1
weapon_2 = "Nuclear-Decay"
#this is a thing that i wrote
#static lists
@ -89,7 +95,7 @@ class mutant(QWidget):
command_str = pyqtSignal(str)
mqtt_str = pyqtSignal(str)
mqtt_str_quiet = pyqtSignal(str,str)
def __init__(self,user,password,char_sel):
def __init__(self,user,password,char_sel,weapon):
QWidget.__init__(self)
#file related
self.path=user
@ -123,6 +129,7 @@ class mutant(QWidget):
self.selected_path = 0
self.path_step = 0
self.location = [0,0]
self.weapon = "Nuclear-Decay"
#value tracking
self.riblets = 0
@ -143,6 +150,7 @@ class mutant(QWidget):
self.user = user
self.password = password
self.char_sel = char_sel
self.logged_in = False
#timers
@ -206,7 +214,7 @@ class mutant(QWidget):
#settings group
self.createSettingsGroup()
self.layout.addLayout(self.settingsGroupBox)
self.weapon_input.setText(weapon)
self.setLayout(self.layout)
self.load_bank_paths()
self.init_telnet()
@ -348,10 +356,12 @@ class mutant(QWidget):
#Text inputs
def createSettingsGroup(self):
self.settingsGroupBox = QFormLayout()
self.weapon_input = QLineEdit("Nuclear-Decay")
self.na_input = QLineEdit("150")
self.yl_input = QLineEdit("2500")
self.path_input = QLineEdit("0")
self.settingsGroupBox.addRow(QLabel("Weapon:"),self.weapon_input)
self.settingsGroupBox.addRow(QLabel("No Action:"),self.na_input)
self.settingsGroupBox.addRow(QLabel("Year Limit:"),self.yl_input)
self.settingsGroupBox.addRow(QLabel("Path:"),self.path_input)
@ -440,7 +450,7 @@ class mutant(QWidget):
#wield timer
def wield_trig(self):
if self.in_combat and self.logged_in and self.in_play:
self.command_str.emit("wie nuclear-decay\r\n")
self.command_str.emit("wie "+self.weapon+"\r\n")
#wander timer
def wander_trig(self):
@ -885,6 +895,7 @@ class mutant(QWidget):
self.ribletLabel.setText(str(self.riblets))
self.ionLabel.setText(str(self.ions))
self.weapon = self.weapon_input.text()
self.na_thresh = int(self.na_input.text())
self.year_limit = int(self.yl_input.text())
self.selected_path = int(self.path_input.text())
@ -1259,7 +1270,7 @@ class mutant(QWidget):
#wield weapon
if key==ord("w"):
self.command_str.emit("wie nuclear-decay\r\n")
self.command_str.emit("wie "+self.weapon+"\r\n")
#drop item
if key==ord("d"):
@ -1386,8 +1397,8 @@ class MainWindow(QMainWindow):
self.setup_mqtt()
mutbox = QHBoxLayout()
self.m1 = mutant(usr_1,pwrd_2,char_sel_1)
self.m2 = mutant(usr_2,pwrd_2,char_sel_2)
self.m1 = mutant(usr_1,pwrd_2,char_sel_1,weapon_1)
self.m2 = mutant(usr_2,pwrd_2,char_sel_2,weapon_2)
mutbox.addWidget(self.m1)
mutbox.addWidget(self.m2)
self.m1.mqtt_str.connect(self.send_mqtt)

Loading…
Cancel
Save