def _get_consumable(name) -> CustomCounter: consumable = next( (con for con in character.consumables if con.name == name), None) if consumable is None: raise ConsumableException(f"There is no counter named {name}.") return consumable
def _get_consumable(self, name): name = str(name) consumable = self._character.get_consumable(name) if consumable is None: raise ConsumableException(f"There is no counter named {name}.") return consumable
def _get_consumable(self, name): consumable = next((con for con in self._character.consumables if con.name == name), None) if consumable is None: raise ConsumableException(f"There is no counter named {name}.") return consumable