Right now, each UnitTypeData has a tech_requirement field. However, there are two separate prerequisite types for building units: buildings, and upgrades, for example:
Dark Templar requires a DT shrine to build.
Warp Gate requires sc2::UPGRADE_ID::WARPGATERESEARCH to build
I think there should be two separate fields to distinguish this for completeness. Also, tech_requirement is a bit of a misnomer since there aren't any 'techs' in the api, just unit types or upgrades. I suggest that UnitTypeData have the following fields:
required_unittypes = vector of unit types required to build the given unit type
required_upgrades = vector of upgrade types required to build the given unit type
Right now, each UnitTypeData has a tech_requirement field. However, there are two separate prerequisite types for building units: buildings, and upgrades, for example:
Dark Templar requires a DT shrine to build. Warp Gate requires sc2::UPGRADE_ID::WARPGATERESEARCH to build
I think there should be two separate fields to distinguish this for completeness. Also, tech_requirement is a bit of a misnomer since there aren't any 'techs' in the api, just unit types or upgrades. I suggest that UnitTypeData have the following fields:
required_unittypes = vector of unit types required to build the given unit type required_upgrades = vector of upgrade types required to build the given unit type