GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

UnitDoneEvent BUG: OrbitalCommand vs CommandCenter #154

Closed razerfive closed 11 years ago

razerfive commented 11 years ago

when scv finished CommandCenter in UnitDoneEvent in sc2reader event.unit.name = "OrbitalCommand" - its a BUG event.unit.name should be - "CommandCenter"

GraylinKim commented 11 years ago

This is not a bug. Outside of the game engine plugins unit.name is always the final name of the unit. This unit was upgraded and the name changed. If you want the original type name you can access the attribute during processing with a game engine plugin or use the unit type_history.

It may not be super intutive behavior for a new user; I will try to make the documentation around this more clear.

razerfive commented 11 years ago

ok, thnx