Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-fix AIM move-all #33637

Merged
merged 1 commit into from
Aug 29, 2019
Merged

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Aug 29, 2019

Summary

SUMMARY: Bugfixes "Fix AIM move-all only moving items from one direction (again)"

Purpose of change

Fixes #33633. It was either a bad merge, or someone thought it was okay to merge the two if statements...

Describe the solution

Used a different logic @ZhilkinSerg suggested below, and added a couple notes to make it clear to further maintainers.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones labels Aug 29, 2019
@ZhilkinSerg
Copy link
Contributor

Maybe do something like this?

    if( g->u.activity.targets.empty() ) {
        g->u.cancel_activity();
    }
    // TODO: Move this to advanced inventory instead of hacking it in here
    if( !keep_going ) {
        g->u.cancel_activity();
        cancel_aim_processing();
    }

@Qrox Qrox force-pushed the re-fix-aim-move-all branch from 6a540e6 to b61581b Compare August 29, 2019 13:47
@Qrox
Copy link
Contributor Author

Qrox commented Aug 29, 2019

Yes, that makes the logic clearer, thank. I also changed it a bit to avoid possible double-invocation of cancel_activity().

@ZhilkinSerg ZhilkinSerg merged commit c98482b into CleverRaven:master Aug 29, 2019
@Qrox Qrox deleted the re-fix-aim-move-all branch September 5, 2019 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AIM "move all items" action is broken again
2 participants