From 83333a8a63c073c17f255461fd9108a475792ba3 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 21 May 2024 02:30:46 +0800 Subject: [PATCH 1/2] Fix: Check the last appear area of assignment started popup --- .../dispatch/ASSIGNMENT_STARTED_CHECK.2.png | Bin 6475 -> 5621 bytes .../dispatch/ASSIGNMENT_STARTED_CHECK.png | Bin 5402 -> 5593 bytes .../assets/assets_assignment_dispatch.py | 16 ++++++++-------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png index b7a6ddea12631bcfa302a1ebe57e1373573996b4..69a3bd91b82175ce424d94ba27985e293f0b62ad 100644 GIT binary patch literal 5621 zcmeH~XHXN$7RQ$W8bFG)P^1eMnl!JX6hS0lfDpQhG^K_jJv5_8Q3QfC=~W>Z5D+0E zB`OFQil87;q&ERW5hDHNe!6e&-22}B_~s2~X7`+(o&WBh--k1M?jsF#S(ycx0RXIe z@QWw_7-=EoBNRe&nj-piG{@uxxAFmih3of02hub70AMz7(bh&HojrX$eVjeLMD?__ zMZLT|9bM2j0SFw(G6}Fur1GkdP;auEYxOTxq@wQtaR~ynmBT8Z;}NjC$HA%D91+cI z&dqZ;6K>XYx0e~76+NDNoal7nLG+avvukI5hzu3I3=N_zE^d9rnY)4gaRM#VX2SmWrWt zpEv{q{rN}mP!LN8(vIsMg=oG8wq|!wG7!>RkW0`Mmt!E6(P6Es6?GxldPd+MXNhCi zv<28SEtz&8dIkctg}FNDMG^G5r+OMk@itx&L^vHFk&`=8FZU>M6O%s*1gtELj*E@I zMOSFq!A@{EGEItSre;WR!Dr|ZoreGr*yw(NF$PA z^}&~9G%4%{9VCX$vd152hONpz6ktgJ98SuL7%BjXjT`Zr(sZCBwQvG}x>>$!#Yr&4 zdnf=GbMKrizi{x-8*T!LE%S{~9SH`pJ8)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(dJuqa#(Epx^`uwXVQeJ;8>?KGo9Z;22*B6lDM<&96LESawnFjR?ZC0J ztJW~ykX?Q)=g$3+XyUC`ochUA>DB7?0rFQ{?OO^5`j5}^>!?fht5tC!Pfyy>^V8G#ENpe`o|f^Pb;Y}jb-h0vG$xHzedjPP0LsGys<3~URFnRS7ifE&=z2b=5I z36!i~MN!r7Tf^uqu zW`@fZ3PS)xSH@z?Y%fC4rkMO3C4sHZm{Pu{)o$?f_Ba4Q|3h;jib7uQ`8dP~UH;p5 z6<^a&0$3>nxfY&OK>5uQ`5_uc|7$ND5h$Mt+*+2MY`UGO>EAUgNK{yQgcn6M$9uNJ zMomjcn(Tc+UUy;7(KlRQZ1B8xDzeLKIUQtUc+67m-8I$xwP;AZH zdKK*2%+27)ipx6h>yO>np5-YFEzt|=3c(grl#23M<$U$kCEbE_Mq9)l_{0e{^zRjQ z=4_j#A{3WJ=*v##{i3TwxnjmSD@i7NxwuS3990NMQT#?ztpC>9d8wKpe5%rz<*mWX zN_+@!E*^tq3Cubsm9SzJku58&-8Xx)0=1eL8&s}^2;OS}(078!f4=2<`xiSuILL@+y0JQ_836L;C?f_Y&Ya;j$ ebHW489PJsm?3bF&v(BFz0Hl0}N$N_>`{`fvy@-nd diff --git a/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png b/assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png index 5dd771be9f90ccc3556f62eb4165790fb78c50d0..b824f42c8c9f9344f89789587f92bc09fb2e8355 100644 GIT binary patch literal 5593 zcmeH~XHXN$7RNUUXaZ8Cg(6+B0MfmPQUsBpK`=;DktQGziu5306e)^8kS0}{Vlbd6 zN<>OTkP?cZAX20gsi8;u%l&lc-MM$}{rKjMJF|Pv&dz^#&+o(8J$Fsd8FH`*vjG4& zj8LaA0I)J$=qEUoX>`TUK$r&Mjk5LyfSvdE4gu+zf&j1?yXxzknqKqr^YXps4cq6xU9`^%ae}|h#w>~18 z&4Q1AZzjsT?sgX&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C?CqqT&r!pjhAoC&(x;_k%X|E~45tn@E&xp@88>Ab=E8B2d3r{wS+xkN3WO~J5LzQ^i!A;$5)1{7e z$A-dBCJb#_$o8fpi z^}x3NH1jvQ%jnd}3qidzUvnWqVh>Act$_KAjzE#S5)5j_vo$qfz})Xw`$gavfnNmv z=Lnc^AVJ7uH``g&)XxAf_Jo~zLv9LlkiavmZe0LlCO)u>IfpRoKLBMG-GGIe1OeRc zzr24V`IGn`B!6|@-%9@eihm{fhp7G}`8Oc`ko@5>`TT0X2>c@Oi@^Ue0ek=_GrFA} Z7zk8@-H9--`Td0eMh53jmFU^s{txhpb9n#& literal 5402 zcmeAS@N?(olHy`uVBq!ia0y~yUqzV0>raz5bW6<0bZmKT`Qha1hm$OiMf?Vuz|gSZ_E#nl!;wh=M73}> zfG7bq29T)33yPArFjCqgE52`~4sw0KV|E1)O=Dk-R-L1@Mgu6F wjaHqbfiPNij+VCypu%9Z(iuU4kkb2+QLvhOcJKM-Mo{E?y85}Sb4q9e0ATGQ82|tP diff --git a/tasks/assignment/assets/assets_assignment_dispatch.py b/tasks/assignment/assets/assets_assignment_dispatch.py index 6cd2bcf67..b5821f627 100644 --- a/tasks/assignment/assets/assets_assignment_dispatch.py +++ b/tasks/assignment/assets/assets_assignment_dispatch.py @@ -43,17 +43,17 @@ ASSIGNMENT_STARTED_CHECK = ButtonWrapper( share=[ Button( file='./assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.png', - area=(542, 412, 1156, 422), - search=(522, 392, 1176, 442), - color=(232, 230, 226), - button=(542, 412, 1156, 422), + area=(509, 317, 525, 383), + search=(489, 297, 545, 403), + color=(231, 231, 225), + button=(509, 317, 525, 383), ), Button( file='./assets/share/assignment/dispatch/ASSIGNMENT_STARTED_CHECK.2.png', - area=(542, 412, 1156, 422), - search=(522, 392, 1176, 442), - color=(254, 244, 221), - button=(542, 412, 1156, 422), + area=(508, 316, 526, 384), + search=(488, 296, 546, 404), + color=(225, 217, 196), + button=(508, 316, 526, 384), ), ], ) From 28af865d7599e1be02396398fb07bb145851dd0b Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 21 May 2024 02:31:27 +0800 Subject: [PATCH 2/2] Opt: Skip first load_rows() if tab switched --- tasks/assignment/ui.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tasks/assignment/ui.py b/tasks/assignment/ui.py index 60e8cde5e..a3d2b3a9b 100644 --- a/tasks/assignment/ui.py +++ b/tasks/assignment/ui.py @@ -151,19 +151,23 @@ class AssignmentUI(UI): Args: group (AssignmentGroup): + Returns: + bool: If group switched + Examples: self = AssignmentUI('src') self.device.screenshot() self.goto_group(KEYWORDS_ASSIGNMENT_GROUP.Character_Materials) """ - if ASSIGNMENT_GROUP_SWITCH.get(self) == group: - if not ASSIGNMENT_ENTRY_LIST.cur_buttons: - ASSIGNMENT_ENTRY_LIST.load_rows(self) - return logger.hr('Assignment group goto', level=3) if ASSIGNMENT_GROUP_SWITCH.set(group, self): self._wait_until_entry_loaded() self._wait_until_correct_entry_loaded(group) + return True + else: + if not ASSIGNMENT_ENTRY_LIST.cur_buttons: + ASSIGNMENT_ENTRY_LIST.load_rows(self) + return False def goto_entry(self, entry: AssignmentEntry, insight: bool = True): """ @@ -185,8 +189,11 @@ class AssignmentUI(UI): return raise ScriptError(err_msg) else: - self.goto_group(entry.group) - ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=insight) + if self.goto_group(entry.group): + # Already insight in goto_group() - _wait_until_correct_entry_loaded() + ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=False) + else: + ASSIGNMENT_ENTRY_LIST.select_row(entry, self, insight=insight) def _wait_until_group_loaded(self): skip_first_screenshot = True