BurnySc2 / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
509 stars 157 forks source link

Unit.mineral_contents and Unit.vespene_contents don't update #72

Closed RZarifov closed 4 years ago

RZarifov commented 4 years ago

The title is self explanatory.
These attributes don't update on game progressing. Most of mineral_patch and vespene_geyser units has these attributes set to 0, since they're not scouted, yet not the ones that are visible from the beginning, nor the ones that been scouted update these attributes.
Or should I use something else to see the current amount of resources left in the patch/geyser?

RZarifov commented 4 years ago

The problem is - unit objects don't update.
You have to request new unit objects each frame by their tags.