Module: Api::AbilityRemapable
- Included in:
- ActionError, ActionRawToggleAutocast, ActionRawUnitCommand, ActionSpatialUnitCommand, ActionToggleAutocast, AvailableAbility, BuildItem, UnitOrder
- Defined in:
- lib/sc2ai/protocol/extensions/ability_remapable.rb
Overview
This module make sure that a read from method ability_id always returns the proper source id
Instance Method Summary collapse
-
#ability_id ⇒ Integer
Ability Id.
Instance Method Details
#ability_id ⇒ Integer
Ability Id. The generic id or “remapid”. i.e. Api::AbilityId::ATTACK_BATTLECRUISER returns generic Api::AbilityId::ATTACK
7 8 9 |
# File 'lib/sc2ai/protocol/extensions/ability_remapable.rb', line 7 def ability_id @ability_id ||= Api::AbilityId.generic_id(send(:method_missing, :ability_id)) end |