Class: Omega::Client::Ship

Inherits:
Object show all
Includes:
HasCargo, HasLocation, InSystem, TrackEntity, TrackState, Trackable
Defined in:
lib/omega/client/entities/ship.rb

Overview

Omega client Manufactured::Ship tracker

Direct Known Subclasses

Corvette, Miner

Instance Attribute Summary

Attributes included from TrackState

#states

Attributes included from Trackable

#entity, #event_handlers

Instance Method Summary collapse

Methods included from HasCargo

#transfer, #transfer_all_to

Methods included from InSystem

#closest, #jump_to, #move_to, #solar_system, #stop_moving

Methods included from HasLocation

included, #location

Methods included from TrackState

included, #off_state, #on_state, #set_state, #unset_state

Methods included from TrackEntity

clear_entities, #entities, entities, included, track_entity

Methods included from Trackable

#clear_handlers, #clear_handlers_for, #handle, #handles?, included, #method_missing, #node, node, #raise_event, #refresh

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Omega::Client::Trackable

Instance Method Details

#collect_loot(loot) ⇒ Object

Collect specified loot

Parameters:


90
91
92
93
# File 'lib/omega/client/entities/ship.rb', line 90

def collect_loot(loot)
  RJR::Logger.info "Entity #{id} collecting loot #{loot.id}"
  @entity = node.invoke 'manufactured::collect_loot', id, loot.id
end

#dock_to(station) ⇒ Object

Dock at the specified station


76
77
78
79
# File 'lib/omega/client/entities/ship.rb', line 76

def dock_to(station)
  RJR::Logger.info "Docking #{id} at #{station.id}"
  node.invoke 'manufactured::dock', id, station.id
end

#undockObject

Undock


82
83
84
85
# File 'lib/omega/client/entities/ship.rb', line 82

def undock
  RJR::Logger.info "Unocking #{id}"
  node.invoke 'manufactured::undock', id
end