Giter VIP home page Giter VIP logo

Comments (2)

GraylinKim avatar GraylinKim commented on July 29, 2024

So this is actually a two part issue.

First part, is that replay.events_by_type is kind of misleading now that we've got some type inheritance for events.

Instead of using the following to get all the ability events:

ability_events = replay.events_by_type['AbilityEvent']

you really need to use:

ability_events = [e for e in replay.events if isinstance(e, sc2reader.objects.AbilityEvent)]

which gets the AbilityEvent, UnknownAbilityEvent, LocationAbilityEvent, and TargetAbilityEvents. Its likely that I should change up the processing code and fix/remove that dictionary for now as its not as useful as it once was.


That brings us to the second issue, which is that you were only getting AbilityEvent classed events. There was a bug in the code which didn't pass the ability code into the event constructor for this particular event class.

This second issue is fixed now. I'll figure out what to do with the events_by_type dict later.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

The root issue with the Ability not being passed through the constructor was resolved months ago.

from sc2reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.