Skip to content
This repository was archived by the owner on May 2, 2020. It is now read-only.

Idle Villager button and hotkey #2

@puzzlepaint

Description

@puzzlepaint
  • If there are idle villagers, the idle villager button should be yellow instead of grayed out. The number of idle villagers should be shown in the bottom-right of the button.
  • Clicking the button (or pressing the corresponding hotkey) should toggle between all idle villagers.

Hints: Iterate over map->GetObjects(), check IsUnit(), GetPlayerIndex() == match->GetPlayerIndex(), and IsVillager() for each entry, and check whether the UnitAction is UnitAction::Idle to find the idle villagers. Use ClearSelection(), AddToSelection(), and SelectionChanged() to modify the selection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions