TheFunny / ArisuAutoSweeper

蔚蓝档案脚本 | Blue Archive Auto Script | WIP
GNU General Public License v3.0
185 stars 13 forks source link

Added Tasks, Shop, MomoTalk #11

Closed RedDeadDepresso closed 6 months ago

RedDeadDepresso commented 6 months ago

Hi, I had some free time so I decided to familiarise myself with the Alas framework. I attempted to implement some simple features using https://github.com/baas-pro/baas as a reference such as Tasks, Shop, MomoTalk. However, I encountered issues with Shop and MomoTalk.

Shop:

MomoTalk:

All mentioned methods are in momotalk/ui.py file.

Understanding the code shouldn't be an issue for you, as I followed the same structure you used in other modules. Also I reused some of your methods, however with different names. I can fix all these problems myself if you can help me and provide feedback.

TheFunny commented 6 months ago

Thanks for the contribution. I can try help you with your problems.

Shop:

Momotalk:

Btw, there is another momotalk icon when it's student's birthday. I'll add that later.

RedDeadDepresso commented 6 months ago

I would be very grateful if you could merge and test as I'm stuck and have no idea how to fix them. The logic is correct for both shop and momotalk, the only thing to do is improve the timing and solve the problem of buttons and switches not being detected in momotalk.

TheFunny commented 6 months ago

Thanks. I'll be adding assets for JP in a few days.

RedDeadDepresso commented 6 months ago

Thanks, if you want and like Missions/Commissions/Event in BAAuto I can try to write it for AAS and refactor MCE-Manager. The code probably won't be optimized but at least I hope it can help you in some way.

RedDeadDepresso commented 6 months ago

Also, another problem I discovered is that in tasks the while loop breaks after self.ui_additional() when the Claim All and Claim buttons are still yellow. Maybe you should add a delay after self.ui_additional().

TheFunny commented 6 months ago

Thanks, if you want and like Missions/Commissions/Event in BAAuto I can try to write it for AAS and refactor MCE-Manager. The code probably won't be optimized but at least I hope it can help you in some way.

Implementing these functions shouldn't be so difficult using existing modules in AAS, so my idea is to try completing in ALAS framework. The only problem is that it may be complicated for user to select the missions they want to sweep. If you can implement MCE seamlessly into AAS, it should be fine.

Also, another problem I discovered is that in tasks the while loop breaks after self.ui_additional() when the Claim All and Claim buttons are still yellow. Maybe you should add a delay after self.ui_additional().

I'll check that later.

RedDeadDepresso commented 6 months ago

I am finding it easy and have already uploaded the assets and written a rough draft, so I think I can finish in two days. I will make a pull request after you fixed the bugs in other tasks.

TheFunny commented 6 months ago

I've fixed switch for message and sort in momotalk in latest dev branch. Now it should work properly. Task exiting condition has been changed so that it now ends after detecting claimed button.

RedDeadDepresso commented 6 months ago

Merry Christmas! I have implemented Mission/Commissions/Event successfully and from my testing it seems to work well. If you want I can make a pull request.

TheFunny commented 6 months ago

Merry Christmas! You can directly make a PR if it's ready. I'll review when I'm free.