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

OBJ_RACEBASE Class Reference

This baseclass for OBJ_Race holds data and handles functionality for races. More...

Inheritance diagram for OBJ_RACEBASE:

Inheritance graph
List of all members.

Private Methods

void AddSector (GALOBJ sec)
void SetMainSector (GALOBJ sec)
void TradeMoney (int val)
int GetNotoriety (GALOBJ race)
int AddNotoriety (GALOBJ race, int amount)
int GetID ()
int GetClass ()
int IsClass (int cl)
GALOBJ GetMainSector ()
table GetSectors ()
string GetName ()
GALOBJ GetShipyard ()
void AddShipyard (GALOBJ gfac)
GALOBJ GetNearestShipyard (GALOBJ gsector, int shipclass)
void OwnShip (GALOBJ gship)
void DisownShip (GALOBJ gship)
table GetOwnedShips ()
void OwnStation (GALOBJ gstation)
void DisownStation (GALOBJ gstation)
table GetOwnedStations ()

Private Attributes

string ra_Name
int ra_ID
GALOBJ ra_MainSector
table ra_Sectors
table ra_OwnedShips
table ra_Shipyards
table ra_OwnedStations

Detailed Description

This baseclass for OBJ_Race holds data and handles functionality for races.


Member Function Documentation

int AddNotoriety GALOBJ    race,
int    amount
[private]
 

Increases or decreases notoriety towards given race in the race, for which this fct. is called depending of "amount" being positive or negative.

Parameters:
amount  Generally values are -1 (hit ship or first hit station), -5 (destroy ship or next hits station), +1 (Destroying an enemy of the race or trading) \race See also Global Variables ga_Races[].

void AddSector GALOBJ    sec [private]
 

adds sector to ra_Sectors

void AddShipyard GALOBJ    gfac [private]
 

adds a factory to ra_Shipyards

void DisownShip GALOBJ    gship [private]
 

removes given OBJ_SHIP from ra_OwnedShips

void DisownStation GALOBJ    gstation [private]
 

removes given OBJ_STATION from ra_OwnedStations

int GetClass   [private]
 

See Functions common in every object.

Reimplemented in OBJ_RACE.

int GetID   [private]
 

returns ra_ID

GALOBJ GetMainSector   [private]
 

returns ra_MainSector

string GetName   [private]
 

returns ra_Name

GALOBJ GetNearestShipyard GALOBJ    gsector,
int    shipclass
[private]
 

Finds a shipyard nearest to a given sector. If shipclass <> 0, find one that sells the given shipclass (OBJ_SHIP_TS, e.g.)

int GetNotoriety GALOBJ    race [private]
 

Returns notoriety amongst given race-object for this race.

table GetOwnedShips   [private]
 

returns ra_OwnedShips

table GetOwnedStations   [private]
 

returns ra_OwnedStations

table GetSectors   [private]
 

returns ra_Sectors

GALOBJ GetShipyard   [private]
 

Find a shipyard of this race in its mainsector.

int IsClass int    cl [private]
 

See Functions common in every object.

Reimplemented in OBJ_RACE.

void OwnShip GALOBJ    gship [private]
 

adds given OBJ_SHIP to ra_OwnedShips

void OwnStation GALOBJ    gstation [private]
 

adds given OBJ_STATION to ra_OwnedStations

void SetMainSector GALOBJ    sec [private]
 

sets ra_MainSector

void TradeMoney int    val [private]
 

same as AddMOney()

Reimplemented in OBJ_RACE.


Member Data Documentation

int ra_ID [private]
 

ID of the race. See Race IDs .

GALOBJ ra_MainSector [private]
 

homesector of race

string ra_Name [private]
 

name of Race

table ra_OwnedShips [private]
 

ships owned by this race

table ra_OwnedStations [private]
 

stations owned by this race

table ra_Sectors [private]
 

sectors controlled/owned by this race

table ra_Shipyards [private]
 

Table of all owned shipyards.


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