Package horizons :: Package world :: Module traderoute :: Class TradeRoute
[hide private]
[frames] | no frames]

Class TradeRoute

source code

util.changelistener.ChangeListener --+
                                     |
                                    TradeRoute

waypoints: list of dicts with the keys

Change notifications mainly notify about changes of enable.

Instance Methods [hide private]
 
__init__(self, ship) source code
 
append(self, warehouse_worldid) source code
 
set_wait_at_load(self, flag)
Method for commands, and some type checking.
source code
 
set_wait_at_unload(self, flag)
Method for commands, and some type checking.
source code
 
move_waypoint(self, position, direction) source code
 
remove_waypoint(self, position) source code
 
toggle_load_unload(self, position, res_id) source code
 
add_to_resource_list(self, position, res_id, amount) source code
 
remove_from_resource_list(self, position, res_id) source code
 
on_route_warehouse_reached(self)
Transfer resources, wait if necessary and move to next warehouse when possible
source code
 
_transfer_resources(self, settlement, resource_list, suppress_messages=False)
Transfers resources to/from settlement according to list.
source code
 
on_ship_blocked(self) source code
 
move_to_next_route_warehouse(self, advance_waypoint=True) source code
 
get_next_destination(self, advance_waypoint) source code
 
get_location(self) source code
 
can_enable(self) source code
 
enable(self) source code
 
disable(self) source code
 
clear(self) source code
 
load(self, db) source code
 
save(self, db) source code
 
get_ship_status(self)
Return the current status of the ship.
source code
    Inherited from util.changelistener.ChangeListener
 
_changed(self)
Calls every listener when an object changed
source code
 
add_change_listener(self, listener, call_listener_now=False, no_duplicates=False) source code
 
add_remove_listener(self, listener, no_duplicates=False)
A listener that listens for removal of the object
source code
 
clear_change_listeners(self)
Removes all change listeners
source code
 
discard_change_listener(self, listener)
Remove listener if it's there
source code
 
discard_remove_listener(self, listener) source code
 
end(self) source code
 
has_change_listener(self, listener) source code
 
has_remove_listener(self, listener) source code
 
remove(self) source code
 
remove_change_listener(self, listener) source code
 
remove_remove_listener(self, listener) source code
Class Methods [hide private]
 
has_route(cls, db, worldid)
Check if a savegame contains route information for a certain ship
source code
Class Variables [hide private]
    Inherited from util.changelistener.ChangeListener
  log = <logging.Logger object>
Method Details [hide private]

__init__(self, ship)
(Constructor)

source code 
Overrides: util.changelistener.ChangeListener.__init__

set_wait_at_load(self, flag)

source code 

Method for commands, and some type checking. See #2287 for details.

set_wait_at_unload(self, flag)

source code 

Method for commands, and some type checking. See #2287 for details.

_transfer_resources(self, settlement, resource_list, suppress_messages=False)

source code 

Transfers resources to/from settlement according to list.

Returns:
TransferStatus instance

load(self, db)

source code 
Overrides: util.changelistener.ChangeListener.load