Add ignore_resource_requirements parameter to be used in available abilities query
@@ -174,15 +174,16 @@ class Client(Protocol):
))
return [ActionResult(p.result) for p in result.query.placements]
- async def query_available_abilities(self, units):
+ async def query_available_abilities(self, units, ignore_resource_requirements=False):
if not isinstance(units, list):
assert isinstance(units, Unit)
units = [units]
assert len(units) > 0
result = await self._execute(query=query_pb.RequestQuery(
abilities=[query_pb.RequestQueryAvailableAbilities(
- unit_tag=unit.tag) for unit in units]
- ))
+ unit_tag=unit.tag) for unit in units]),
+ ignore_resource_requirements=ignore_resource_requirements
+ )
return [[AbilityId(a.ability_id) for a in b.abilities] for b in result.query.abilities]
async def chat_send(self, message, team_only):
