lib/strategy_game_backend/behaviours/destructable.rb
# Repairs the destuctable thing by increasing the primary health by the
# amount specified. It will limit at initial primary health.
Repairs the destuctable thing by increasing the primary health by the
amount specified. It will limit at initial primary health.
Repairs the destuctable thing by increasing the primary health by the amount specified . It will limit at initial primary health .
def repair(amount)
        if @primary_health.nil?
          raise StrategyGameBackend::Behaviours::Destructable::Error,
                "#{self.class.name} has not had its health set. Missing set_initial_health call?"
        end
        @primary_health += amount
        @primary_health = @initial_primary_health if @primary_health > @initial_primary_health
      end
def repair ( amount ) if @primary_health . nil? raise StrategyGameBackend :: Behaviours :: Destructable :: Error , "#{self.class.name} has not had its health set. Missing set_initial_health call?" end @primary_health += amount @primary_health = @initial_primary_health if @primary_health > @initial_primary_health end
Repairs the destuctable thing by increasing the primary health by the
amount specified.
Repairs the destuctable thing by increasing the primary health by the amount specified .
amount