Max lair/added save on the go#1101
Max lair/added save on the go#1101Boombaastical wants to merge 21 commits intoPokemonAutomation:mainfrom
Conversation
… regions' coordinates
|
Looks like you included a ton of your local changes that are irrelevant. |
| console, context, | ||
| save_path, | ||
| global_state | ||
| ); |
There was a problem hiding this comment.
Try not to deviate too much from our formatting standard. While we don't document it, there is a pattern to try to adhere to.
There was a problem hiding this comment.
Updated this, I thought I reverted back to the original, should've checked before sending the PR, sorry.
| #include "Common/Cpp/Options/BooleanCheckBoxOption.h" | ||
| #include "Common/Cpp/Options/ConfigOption.h" | ||
| #include <vector> | ||
| #include <memory> |
There was a problem hiding this comment.
Same here applies with general formatting. We generally order our includes as:
- C++ system headers <>
- OS-specific system headers <>
- Qt system headers <>
- Our headers in approximate order of dependency. So "Common/" is almost always at the top.
There was a problem hiding this comment.
Now should be the right logic, indeed I didn't notice the order, but thanks for clarifying!
| VideoStream& stream, | ||
| Language language, | ||
| const ImageViewRGB32& screen | ||
| ) { |
| for (int i = 0; i < 3; ++i) { | ||
| auto cropped = extract_box_reference(screen, NAME_BOXES[i]); | ||
| OCR::StringMatchResult result = PokemonNameReader::instance().read_substring( | ||
| stream.logger(), language, cropped, OCR::BLACK_OR_WHITE_TEXT_FILTERS(), |
| // Read the three currently saved paths (if any) from the entrance screen and return the index of the first slot that is NOT protected, returns -1 otherwise | ||
| int find_unprotected_slot( | ||
| const std::vector<std::string>& current_slugs, | ||
| const EndBattleDecider& actions, |
| AdventureRuntime& runtime, | ||
| ProgramEnvironment& env, size_t console_index, | ||
| VideoStream& stream, ProControllerContext& context, | ||
| bool followed_path, |
| } | ||
|
|
||
| // If we exceed the 3 boxes ticked, we revert the change for the last box ticked | ||
| if (checked > 3) { |
There was a problem hiding this comment.
I have a better idea for this. Instead of only allowing 3 to be checked. Let's have the program automatically stop when the list is full. I think the main usecase will be people just looking to fill the saved bosses list since they won't care what order they hunt their legendaries.
| class BossActionRow : public StaticTableRow{ | ||
| class BossActionRow : public StaticTableRow, | ||
| private ConfigOption::Listener | ||
| { |
There was a problem hiding this comment.
class BossActionRow : public StaticTableRow, private ConfigOption::Listener{
| class BossActionTable : public StaticTableOption{ | ||
| class BossActionTable : public StaticTableOption, | ||
| private ConfigOption::Listener | ||
| { |
There was a problem hiding this comment.
class BossActionTable : public StaticTableOption, private ConfigOption::Listener{
|
|
||
| bool yes_no_box_present = is_white(yes_no_box_stats, 400, 10); | ||
|
|
||
| bool paths_box_present = is_white(paths_box_stats, 400, 10); |
There was a problem hiding this comment.
Have you taken a look at DialogBoxDetector and SelectionArrowFinder.?
As I often ran these Max Lair adventures, I thought that stopping on each new boss that one wants to save takes quite a bit more time than saving them automatically on the go. This would be especially interesting for those who just start with the Max Lair and keep the paths for the difficult bosses (e.g. Zygarde) directly.
Not sure if the code is proper, I tried to use the same style as was there before with a while loop. I tested it a few times and it works smoothly, I added extra time to make sure not to lose button presses because it's quite an important task.