Skip to content

Wrong AbilityId of ActionRawUnitCommand since 94e94ed #242

@maxnus

Description

@maxnus

I'm printing an APM report at the end of my game by keeping track of all bot.state.actions during the entire game. Since I updated python-sc2 recently, it has become completely nonsensical.

I think there is a bug introduced in 94e94ed in game_state.py (see 94e94ed#r183392187), where the field ability_id was moved from ActionRawUnitCommand to its base class, AbilityLookupTemplateClass. This changes the argument order of the initializer (before: game_loop, ability_id, ..., after: ability_id, game_loop, ..., but callers, such as game_state.actions have not been updated to the new ordering:

Image

edit: it looks like the same may apply to ActionRawToggleAutocast

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions