Skip to content

Commit

Permalink
Fixing some price checking bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Graveflo committed Aug 5, 2020
1 parent bf50e8b commit fa4b241
Show file tree
Hide file tree
Showing 13 changed files with 286 additions and 120 deletions.
3 changes: 2 additions & 1 deletion Forms/Main_Window.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def setupUi(self, MainWindow):
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, -97, 848, 558))
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 848, 558))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout_8.setObjectName("verticalLayout_8")
Expand Down Expand Up @@ -286,6 +286,7 @@ def setupUi(self, MainWindow):
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.table_FS = QtWidgets.QTableWidget(self.tab_fs_equip)
self.table_FS.setAlternatingRowColors(True)
self.table_FS.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.table_FS.setObjectName("table_FS")
self.table_FS.setColumnCount(7)
self.table_FS.setRowCount(0)
Expand Down
5 changes: 4 additions & 1 deletion Forms/Main_Window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-97</y>
<y>0</y>
<width>848</width>
<height>558</height>
</rect>
Expand Down Expand Up @@ -692,6 +692,9 @@
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
Expand Down
6 changes: 3 additions & 3 deletions Forms/dlg_About.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def retranslateUi(self, Dialog):
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Black Spirit Art:</p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">LissNes (<a href=\"https://www.deviantart.com/lissnes\"><span style=\" text-decoration: underline; color:#0000ff;\">https://www.deviantart.com/lissnes)</span></a></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;\"><br /></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Testers:<br />Isaacvithurston (reddit<span style=\" font-family:\'Courier New\';\">)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Testers:<br /><span style=\" font-family:\'Courier New\';\">LocustSpawning (BDO)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Isaacvithurston (reddit<span style=\" font-family:\'Courier New\';\">)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Courier New\';\">d3lak (GitHub)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Courier New\';\">hiLLo612 (BDO)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Courier New\';\">LocustSpawning (BDO)</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'Courier New\';\"><br /></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Courier New\';\">Tsukigato (reddit)</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'Courier New\';\"><br />Inspiration: (</span><a href=\"https://docs.google.com/spreadsheets/d/1WzAeIFslcWhZ-TudUTrvt4S6ejGF8Uo5FwVqNivfHK0/edit#gid=0\"><span style=\" font-family:\'Courier New\'; text-decoration: underline; color:#0000ff;\">https://docs.google.com/spreadsheets/d/1WzAeIFslcWhZ-TudUTrvt4S6ejGF8Uo5FwVqNivfHK0/edit#gid=0</span></a><span style=\" font-family:\'Courier New\';\">)<br />Data tables: (</span><a href=\"https://docs.google.com/spreadsheets/d/1folCDSzYD8JQMT9tJHxJtmwy9CXVAO3SQegdESQKLk4\"><span style=\" font-family:\'Courier New\'; text-decoration: underline; color:#0000ff;\">https://docs.google.com/spreadsheets/d/1folCDSzYD8JQMT9tJHxJtmwy9CXVAO3SQegdESQKLk4)</span></a><br /><br /></p></body></html>"))

6 changes: 3 additions & 3 deletions Forms/dlg_About.ui
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Black Spirit Art:&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;LissNes (&lt;a href=&quot;https://www.deviantart.com/lissnes&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://www.deviantart.com/lissnes)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Testers:&lt;br /&gt;Isaacvithurston (reddit&lt;span style=&quot; font-family:'Courier New';&quot;&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Testers:&lt;br /&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;LocustSpawning (BDO)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Isaacvithurston (reddit&lt;span style=&quot; font-family:'Courier New';&quot;&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;d3lak (GitHub)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;hiLLo612 (BDO)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;LocustSpawning (BDO)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;Tsukigato (reddit)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;&lt;br /&gt;Inspiration: (&lt;/span&gt;&lt;a href=&quot;https://docs.google.com/spreadsheets/d/1WzAeIFslcWhZ-TudUTrvt4S6ejGF8Uo5FwVqNivfHK0/edit#gid=0&quot;&gt;&lt;span style=&quot; font-family:'Courier New'; text-decoration: underline; color:#0000ff;&quot;&gt;https://docs.google.com/spreadsheets/d/1WzAeIFslcWhZ-TudUTrvt4S6ejGF8Uo5FwVqNivfHK0/edit#gid=0&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Courier New';&quot;&gt;)&lt;br /&gt;Data tables: (&lt;/span&gt;&lt;a href=&quot;https://docs.google.com/spreadsheets/d/1folCDSzYD8JQMT9tJHxJtmwy9CXVAO3SQegdESQKLk4&quot;&gt;&lt;span style=&quot; font-family:'Courier New'; text-decoration: underline; color:#0000ff;&quot;&gt;https://docs.google.com/spreadsheets/d/1folCDSzYD8JQMT9tJHxJtmwy9CXVAO3SQegdESQKLk4)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
Expand Down
5 changes: 5 additions & 0 deletions Forms/dlg_Manage_Alts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ def setupUi(self, dlg_Manage_Alts):
self.verticalLayout = QtWidgets.QVBoxLayout(dlg_Manage_Alts)
self.verticalLayout.setObjectName("verticalLayout")
self.scrollArea = QtWidgets.QScrollArea(dlg_Manage_Alts)
self.scrollArea.setStyleSheet("QScrollArea{\n"
"border: 1px solid white;\n"
"}")
self.scrollArea.setFrameShadow(QtWidgets.QFrame.Raised)
self.scrollArea.setLineWidth(2)
self.scrollArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
self.scrollArea.setWidgetResizable(True)
Expand Down
11 changes: 11 additions & 0 deletions Forms/dlg_Manage_Alts.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="styleSheet">
<string notr="true">QScrollArea{
border: 1px solid white;
}</string>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
Expand Down
12 changes: 8 additions & 4 deletions FrmMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ def cmdFSRemove_clicked():
tsettings = tmodel.settings
tw = frmObj.table_FS

effect_list = [i.row() for i in tw.selectedItems()]
effect_list = list(set([i.row() for i in tw.selectedItems()]))
effect_list.sort()
effect_list.reverse()

Expand Down Expand Up @@ -2114,9 +2114,13 @@ def cmdEquipAdd_clicked(self, bool_):

def fs_gear_set_costs(self, this_gear:Gear, item_store:ItemStore, table_FS, row):
if this_gear.get_enhance_lvl_idx() >= this_gear.get_backtrack_start():
this_gear.procurement_cost = item_store.get_cost(this_gear)
this_gear.sale_balance = item_store.get_cost(this_gear, grade=this_gear.get_enhance_lvl_idx() + 1)
this_gear.fail_sale_balance = item_store.get_cost(this_gear, grade=this_gear.get_enhance_lvl_idx() - 1)

try:
this_gear.procurement_cost = item_store.get_cost(this_gear)
this_gear.sale_balance = item_store.get_cost(this_gear, grade=this_gear.get_enhance_lvl_idx() + 1)
this_gear.fail_sale_balance = item_store.get_cost(this_gear, grade=this_gear.get_enhance_lvl_idx() - 1)
except TypeError:
pass
else:
this_gear.procurement_cost = 0
this_gear.sale_balance = 0
Expand Down
Loading

0 comments on commit fa4b241

Please sign in to comment.