Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

OBJ_DOCK Class Reference

A dock for trading with wares. More...

Inheritance diagram for OBJ_DOCK:

Inheritance graph
List of all members.

Private Methods

GALOBJ Create (int x, int y, int z, int ssubtype, int raceid)
GALOBJ Destruct ()
void AddTradeable (int gtype, int gsubtype)
table GetTradeables ()
int GetClass ()
int IsClass (int cl)
int GetGType ()
int GetType ()
string GetName ()
string GetYourName ()
void SetYourName (string a_s)
int GetWareTypePrice (int maintype, int subtype)
void AddTo (GALOBJ gsector)
void InitialFill ()
BOOL CanBuyWareType (int gtype, int gsubtype)
BOOL CanSellWareType (int gtype, int gsubtype)
BOOL TradesWithWareType (int gtype, int gsubtype)
int GetWareTypeBestStore (int gtype, int gsubtype)
int AddWare (int gtype, int gsubtype, int count)

Private Attributes

table do_Tradeables
int do_DockType
string do_Name

Detailed Description

A dock for trading with wares.


Member Function Documentation

void AddTo GALOBJ    gsector [private]
 

adds this dock to given sector

void AddTradeable int    gtype,
int    gsubtype
[private]
 

Adds a given ware to do_Tradeables.

int AddWare int    gtype,
int    gsubtype,
int    count
[private]
 

Adds ware (see OBJ_STATION::AddWare()) if the station can trade with this ware. (That means there is an entry in do_Tradeables). If the dock is a equipment dock it does not accept lasers, shields or rockets.

Reimplemented from OBJ_STATION.

BOOL CanBuyWareType int    gtype,
int    gsubtype
[private]
 

Checks if this can buy the given ware. If this is a dock, it can buy all lasers, shields and rockets.

Reimplemented from OBJ_STATION.

BOOL CanSellWareType int    gtype,
int    gsubtype
[private]
 

checks if this can sell the given ware.

Reimplemented from OBJ_STATION.

GALOBJ Create int    x,
int    y,
int    z,
int    ssubtype,
int    raceid
[private]
 

creates a dock with given parameters. See *_DOCK subtype constants-definitions and Race IDs .

Reimplemented in OBJ_DOCK_EQUIP.

GALOBJ Destruct   [private]
 

Sends all dock-owned objects a message that their owner object is destroyed, destroys all landed ships and then itself.

Reimplemented from OBJ_STATION.

int GetClass   [private]
 

Functions common in every object

Reimplemented from OBJ_STATION.

Reimplemented in OBJ_DOCK_GONER, OBJ_DOCK_TRADE, OBJ_DOCK_EQUIP, OBJ_DOCK_PIRATE, and OBJ_DOCK_KHAAK.

int GetGType   [private]
 

Differences of in-game objects

string GetName   [private]
 

returns do_Name

Reimplemented from OBJ_STATION.

table GetTradeables   [private]
 

returns do_Tradeables

int GetType   [private]
 

Differences of in-game objects

int GetWareTypeBestStore int    gtype,
int    gsubtype
[private]
 

What is the best amount of a given ware to store in the station?

Reimplemented from OBJ_STATION.

int GetWareTypePrice int    maintype,
int    subtype
[private]
 

the price for the given ware at this dock. The prices are average-prices (at the moment)

Reimplemented from OBJ_STATION.

string GetYourName   [private]
 

same as GetName()

Reimplemented from OBJ_STATION.

void InitialFill   [private]
 

fill dock ideally with tradeables

int IsClass int    cl [private]
 

Functions common in every object

Reimplemented from OBJ_STATION.

Reimplemented in OBJ_DOCK_GONER, OBJ_DOCK_TRADE, OBJ_DOCK_EQUIP, OBJ_DOCK_PIRATE, and OBJ_DOCK_KHAAK.

void SetYourName string    a_s [private]
 

returns do_DockType

BOOL TradesWithWareType int    gtype,
int    gsubtype
[private]
 

returns whether the dock can trade with the given ware

Reimplemented from OBJ_STATION.


Member Data Documentation

int do_DockType [private]
 

The type of the dock. (0 == Trade-dock, 1 == Equipment-dock).

string do_Name [private]
 

name of the dock

table do_Tradeables [private]
 

wares the station can trade with. format: {typecode,amount}. see also Macro Definitions .


Generated on Mon Aug 26 18:26:24 2002 for X² KC by doxygen1.2.17