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

OBJ_SECTOR Class Reference

List of all members.

Private Methods

void SetOwner (GALOBJ ownerobj)
void SetVisited (int visited)
int GetX ()
int GetY ()
table GetSuns ()
table GetPlanets ()
table GetShips ()
table GetDocks ()
table GetFactories ()
table GetAsteroids ()
table GetNebulas ()
table GetCustomGalObj ()
table GetGates ()
table GetFlyingWares ()
GALOBJ GetOwner ()
int GetClass ()
int IsClass (int cl)
int GetGType ()
int GetType ()
int GetObjectID ()
int GetVisited ()
string GetName ()
string GetYourName ()
GALOBJ GetEnvironment ()
GALOBJ GetGateDirXY (int dirx, int diry)
GALOBJ GetNorthGate ()
GALOBJ GetSouthGate ()
GALOBJ GetWestGate ()
GALOBJ GetEastGate ()
GALOBJ GetGate (int gateid)
int GetGateIDs ()
int GetPopulation ()
void SetPopulation (int a_p)
void AddSun (GALOBJ sun)
void AddPlanet (GALOBJ planet)
void RemovePlanet (GALOBJ planet)
void AddDock (GALOBJ dock)
void RemoveDock (GALOBJ dock)
void AddFactory (GALOBJ factory)
void RemoveFactory (GALOBJ factory)
void AddAsteroid (GALOBJ asteroid)
void RemoveAsteroid (GALOBJ asteroid)
void AddNebula (GALOBJ nebula)
void RemoveNebula (GALOBJ nebula)
void AddCustomGalObj (GALOBJ gobject)
void RemoveCustomGalObj (GALOBJ gobject)
void AddGate (GALOBJ gate)
void RemoveGate (GALOBJ gate)
void AddShip (GALOBJ ship)
void RemoveShip (GALOBJ ship)
void AddFlyingWare (GALOBJ ware)
void RemoveFlyingWare (GALOBJ ware)
int FindShip (int a_raceid, int a_class, int a_subtype, int a_flags, int a_refobj, int a_maxdist, int a_num, int a_x, int a_y, int a_z)
int FindAsteroid (int a_restype, int a_minyield, int a_flags, int a_refobj, int a_maxdist, int a_num, int a_x, int a_y, int a_z)
int FindFlyingWare (int a_maintype, int a_subtype, int a_flags, int a_refobj, int a_maxdist, int a_num, int a_x, int a_y, int a_z)
GALOBJ FindStation (int a_raceid, int a_class, int a_type, int a_flags, GALOBJ a_refobj, int a_serial, int a_maxjumps)

Private Attributes

int sec_X
int sec_Y
GALOBJ sec_Owner
table sec_Ships
table sec_Planets
table sec_Suns
table sec_Docks
table sec_Factories
table sec_Asteroids
int sec_GalaxyCut
int sec_GateIDs
BOOL sec_Visited
int sec_Population
table sec_CustomGalObj

Detailed Description

From this class an object is instaced for every sector existing in the X-Universe (See also Global Variables ga_Sectors[] ). For differences between active and inactive sectors see Differences of in-game objects . The objects of this class handle the galaxy-case, that means you can access a sector´s contents even if the player is not actually in it.


Member Function Documentation

void AddAsteroid GALOBJ    asteroid [private]
 

adds a GALOBJ to the corresponding table

void AddCustomGalObj GALOBJ    gobject [private]
 

adds a GALOBJ to sec_CustomGalObj

void AddDock GALOBJ    dock [private]
 

adds a GALOBJ to the corresponding table

void AddFactory GALOBJ    factory [private]
 

adds a GALOBJ to the corresponding table

void AddFlyingWare GALOBJ    ware [private]
 

adds a GALOBJ to the corresponding table

void AddGate GALOBJ    gate [private]
 

adds a GALOBJ to the corresponding table

void AddNebula GALOBJ    nebula [private]
 

adds a GALOBJ to the corresponding table

void AddPlanet GALOBJ    planet [private]
 

adds a GALOBJ to the corresponding table

void AddShip GALOBJ    ship [private]
 

adds a GALOBJ to the corresponding table

void AddSun GALOBJ    sun [private]
 

adds a GALOBJ to the corresponding table

int FindAsteroid int    a_restype,
int    a_minyield,
int    a_flags,
int    a_refobj,
int    a_maxdist,
int    a_num,
int    a_x,
int    a_y,
int    a_z
[private]
 

find an asteroid

Parameters:
a_restype  resource type if >= 0
a_minyield  minimum yield if > 0
a_refobj  object for FIND_NEAREST (object must be in same environment!), if a_maxdist > 0 or by FIND_ENEMY,FIND_NEUTRAL,FIND_FRIEND
a_maxdist  maximum distance from a_refobj or a_x/a_y/a_z
a_num  number of ships to find if FIND_MULTIPLE is set
a_x  position if a_refobj == 0
a_y 
a_z 
a_flags  FIND_NEAREST, FIND_RANDOM, FIND_MULTIPLE
Returns :
if flag FIND_MULTIPLE is set, returns an array of found asteroids, else returns an asteroid if found or 0 if nothing is found

int FindFlyingWare int    a_maintype,
int    a_subtype,
int    a_flags,
int    a_refobj,
int    a_maxdist,
int    a_num,
int    a_x,
int    a_y,
int    a_z
[private]
 

find a ware flying around in the sector

Parameters:
a_maintype  maintype if >= 0
a_subtype  subtype if > 0
a_refobj  object for FIND_NEAREST (object must be in same environment!), if a_maxdist > 0 or by FIND_ENEMY,FIND_NEUTRAL,FIND_FRIEND
a_maxdist  maximum distance from a_refobj or a_x/a_y/a_z
a_num  number of ships to find if FIND_MULTIPLE is set
a_x  position if a_refobj == 0
a_y 
a_z 
a_flags  FIND_NEAREST, FIND_RANDOM, FIND_MULTIPLE
Returns :
if flag FIND_MULTIPLE is set, returns an array of found wares, else returns a ware if found or 0 if nothing is found

int FindShip int    a_raceid,
int    a_class,
int    a_subtype,
int    a_flags,
int    a_refobj,
int    a_maxdist,
int    a_num,
int    a_x,
int    a_y,
int    a_z
[private]
 

find a ship

Parameters:
a_raceid  if not 0, the race id to match
a_class  if not 0, the object class to match (OBJ_SHIP, OBJ_SHIP_M3, ...)
a_subtype  if >= 0, the subtype to match (SS_SH_A_M3, ...)
a_refobj  object for FIND_NEAREST (object must be in same environment!), if a_maxdist > 0 or by FIND_ENEMY,FIND_NEUTRAL,FIND_FRIEND
a_maxdist  maximum distance from a_refobj or a_x/a_y/a_z
a_num  number of ships to find if FIND_MULTIPLE is set
a_x  position if a_refobj == 0
a_y 
a_z 
a_flags  FIND_NEAREST, FIND_RANDOM, FIND_ENEMY, FIND_NEUTRAL, FIND_FRIEND, FIND_MULTIPLE
Returns :
if flag FIND_MULTIPLE is set and not (FIND_NEAREST and FIND_RANDOM), returns an array of found ships, else returns a ship if found or 0 if nothing is found

GALOBJ FindStation int    a_raceid,
int    a_class,
int    a_type,
int    a_flags,
GALOBJ    a_refobj,
int    a_serial,
int    a_maxjumps
[private]
 

find a station

Parameters:
a_raceid  if >0, owner race
a_class  if not 0, galaxy class of the station (e.g. OBJ_DOCK, OBJ_FACTORY_SHIP)
a_type  if >0, Typecode of the station (e.g. TYPECODE(SSTYPE_FACTORY, SS_FAC_A_SHIP) ). If a_flags & FIND_TYPEASWARECATEGORIE, this is used as ware categorie!
a_flags  FIND_ENEMY, FIND_FRIEND, FIND_NEUTRAL, FIND_TYPEASWARECATEGORIE, FIND_RANDOM, FIND_EXACTJUMPS
a_refobj  object for FIND_ENEMY,FIND_NEUTRAL,FIND_FRIEND
a_serial  if >= 0, Serial number for factories
a_maxjumps  if >= 0, maximum sector jumps.
Returns :
the station found or 0

table GetAsteroids   [private]
 

returns sec_Asteroids

int GetClass   [private]
 

See Functions common in every object.

table GetCustomGalObj   [private]
 

returns sec_CustomGalObj

table GetDocks   [private]
 

returns sec_Docks

GALOBJ GetEastGate   [private]
 

returns sec_EastGate

GALOBJ GetEnvironment   [private]
 

returns object that contains this object (in this case 0 because all other objects are in sectors)

table GetFactories   [private]
 

returns sec_Factories

table GetFlyingWares   [private]
 

returns sec_FlyingWares

GALOBJ GetGate int    gateid [private]
 

returns the gate with the ID of "gateid". gateid can be DIRECTION_* (0 to 5)

GALOBJ GetGateDirXY int    dirx,
int    diry
[private]
 

if dirx>0 function returns the eastgate, otherwise the westgate; same with diry and south/northgate

int GetGateIDs   [private]
 

Return all existing warpgates as a bit mask. Use "GetGateIDs() & bitmask" to find out if a specific warpgate exists. BITMASKS: North Gate: 1<<DIRECTION_NORTH; South Gate: 1<<DIRECTION_SOUTH; West Gate: 1<<DIRECTION_WEST; East Gate: 1<<DIRECTION_EAST. For example: to get the northgate use "GetGateIDs() & 1<<DIRECTION_NORTH"

table GetGates   [private]
 

returns sec_Gates

int GetGType   [private]
 

See Differences of in-game objects.

string GetName   [private]
 

returns name of the sector

table GetNebulas   [private]
 

returns sec_Nebulas

GALOBJ GetNorthGate   [private]
 

returns sec_NorthGate

int GetObjectID   [private]
 

See Functions common in every object.

GALOBJ GetOwner   [private]
 

returns sec_Owner

table GetPlanets   [private]
 

returns sec_Planets

int GetPopulation   [private]
 

returns sec_Population

table GetShips   [private]
 

returns sec_Ships

GALOBJ GetSouthGate   [private]
 

returns sec_SouthGate

table GetSuns   [private]
 

returns sec_Suns

int GetType   [private]
 

See Differences of in-game objects.

int GetVisited   [private]
 

returns sec_Visited

GALOBJ GetWestGate   [private]
 

returns sec_WestGate

int GetX   [private]
 

returns sec_X

int GetY   [private]
 

returns sec_Y

string GetYourName   [private]
 

same as GetName()

int IsClass int    cl [private]
 

See Functions common in every object.

void RemoveAsteroid GALOBJ    asteroid [private]
 

removes a GALOBJ from the corresponding table

void RemoveCustomGalObj GALOBJ    gobject [private]
 

removes a GALOBJ from sec_CustomGalObj

void RemoveDock GALOBJ    dock [private]
 

removes a GALOBJ from the corresponding table

void RemoveFactory GALOBJ    factory [private]
 

removes a GALOBJ from the corresponding table

void RemoveFlyingWare GALOBJ    ware [private]
 

removes a GALOBJ from the corresponding table

void RemoveGate GALOBJ    gate [private]
 

removes a GALOBJ from sec_CustomGalObj

void RemoveNebula GALOBJ    nebula [private]
 

removes a GALOBJ from the corresponding table

void RemovePlanet GALOBJ    planet [private]
 

removes a GALOBJ from the corresponding table

void RemoveShip GALOBJ    ship [private]
 

removes a GALOBJ from the corresponding table

void SetOwner GALOBJ    ownerobj [private]
 

sets the owner of this sector.

void SetPopulation int    a_p [private]
 

sets sec_Population

void SetVisited int    visited [private]
 

sets sec_Visited


Member Data Documentation

table sec_Asteroids [private]
 

OBJ_ASTEROID instances in this sector.

table sec_CustomGalObj [private]
 

other objects than stations, ships, planets.., e.g wares

table sec_Docks [private]
 

OBJ_DOCK instances in this sector.

table sec_Factories [private]
 

OBJ_FACTORY instances in this sector.

int sec_GalaxyCut [private]
 

which galaxy cut is being used

int sec_GateIDs [private]
 

bitmask of gate ids

GALOBJ sec_Owner [private]
 

OBJ_RACE instance.

table sec_Planets [private]
 

OBJ_PLANET instances in this sector.

int sec_Population [private]
 

population of the sector

table sec_Ships [private]
 

OBJ_SHIP instances in this sector.

table sec_Suns [private]
 

OBJ_SUN instances in this sector.

BOOL sec_Visited [private]
 

sector already known by player? (display in galaxy-map depends on this)

int sec_X [private]
 

X-coordinate of sector in sector-map (0 <= x < SECTORS_X).

int sec_Y [private]
 

Y-coordinate of sector in sector-map (0 <= y < SECTORS_Y).


Generated on Mon Aug 26 18:26:28 2002 for X˛ KC by doxygen1.2.17