Method: Unit#info

Defined in:
lib/lib/units/unit.rb

#infoObject

Set long info string: short info string, armour, moves, function, cargo



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/lib/units/unit.rb', line 283

def info
  ret = to_s + ": armour #{@armour_left}/#{@armour_max}"

  if @moves_max > 0
    ret = ret + ", moves #{@moves_left}/#{@moves_max}"
  end

  ret = ret + ", #{@function.info}"

  if @cargo_max > 0
    ret = ret + ", cargo #{@cargo.size}/#{@cargo_max}"
  end

  ret
end