Skip to content

Buggfixes, added methods and a lot better docs

Emil Brynielsson requested to merge emibr898/pycommandcenter:master into master

Buggs fixed:

  • building placement when you want some spacing now works
  • the correct constructor for unittype is called when calling from python
  • unit.target doesn't crash the debugger anymore when a target is missing
  • unit.is_training is not just the opposite to is_idle. Added to make sure unit is a building too.
  • fixed problem with all minerals being empty on all other baselocations than starting base
  • debug spawning of units now spaws for the correct player
  • added more types of geysers to isGeyser same for minerals and made sure refinieries have isRefinery on those geysers
  • drawLine was not working, terrainHeight was messing things up.

Added:

  • map_tools.map_name to get the name of the current map
  • draw_tile to draw outline of a tile
  • Point2DI and Point2D can now be hashed to be stored in python dicts and sets
  • Conversion between Point2D and Point2DI and the other way around made easy with new constructors
  • UnitType.attack_damage added to show base attackdamage of an unit
  • Unit.progression_list to get the entire list of percentages of current processes. Can be used to see if the unit has a reactor
  • UnitType.can_attack_air and .can_attack_ground to check if the unittype can attack or not.
  • building_placer.can_build_here_with_size takes coordinates and width and height to check if it can be buildt at the position. Addons can have weird sizes so this can be used to do checks regarding those.

Random:

  • More or less everything in the API has got a comment in the documentaion and changed some comments to avoid confusions
  • Most of the comments are moved from the .rst files and into the .cpp instead in order to see the documentation with intellisense and autogenerate it for the docs instead.
  • Maptools docs doesn't appear two times.
Edited by David Bergström

Merge request reports