Planeshift
Public Member Functions | Protected Attributes

gemItem Class Reference

#include <gem.h>

List of all members.

Public Member Functions

virtual void Broadcast (int clientnum, bool control)
void ClearItemData ()
 gemItem (GEMSupervisor *gemsupervisor, CacheManager *cachemanager, EntityManager *entitymanager, psItem *item, const char *factname, InstanceID myInstance, iSector *room, const csVector3 &pos, float xrotangle, float yrotangle, float zrotangle, int clientnum)
virtual float GetBaseAdvertiseRange ()
 This value indicates the range that this entity would become visible to other entities if no other modifiers were taken into consideration.
virtual bool GetCanTransform ()
psItemGetItemData ()
virtual const char * GetObjectType ()
virtual void GetRotation (float &xrotangle, float &yrotangle, float &zrotangle)
 Get the x,y and z axis rotations for the item.
uint32_t GetTribeID ()
virtual bool GetVisibility ()
virtual bool IsConstructible ()
virtual bool IsContainer ()
virtual bool IsLockable ()
virtual bool IsLocked ()
virtual bool IsPickupable ()
 Gets if the object can be picked up from anyone.
virtual bool IsPickupableStrong ()
 Gets if the object can be picked up from anyone according to strong rules.
virtual bool IsPickupableWeak ()
 Gets if the object can be picked up from anyone according to weak rules.
virtual bool IsSecurityLocked ()
virtual bool IsUsingCD ()
virtual bool Send (int clientnum, bool control, bool to_superclients, psPersistAllEntities *allEntities=NULL)
 Send this object to the given client.
virtual void SendBehaviorMessage (const csString &str, gemObject *obj)
virtual void SetPosition (const csVector3 &pos, float angle, iSector *sector, InstanceID instance)
 Set position of item in world.
virtual void SetRotation (float xrotangle, float yrotangle, float zrotangle)
 Set the x, y and z axis rotations for the item.
void SetTribeID (uint32_t id)
virtual ~gemItem ()
iScriptableVar implementation

Functions that implement the iScriptableVar interface.

virtual double GetProperty (MathEnvironment *env, const char *ptr)
virtual double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)

Protected Attributes

psItemitemdata
csString itemType
uint32_t tribeID
 Holds the id of the tribe owning this item (0 if is not tribe-owned)
float xRot
float yRot
float zRot

Detailed Description

Definition at line 764 of file gem.h.


Constructor & Destructor Documentation

gemItem::gemItem ( GEMSupervisor gemsupervisor,
CacheManager cachemanager,
EntityManager entitymanager,
psItem item,
const char *  factname,
InstanceID  myInstance,
iSector *  room,
const csVector3 &  pos,
float  xrotangle,
float  yrotangle,
float  zrotangle,
int  clientnum 
)
virtual gemItem::~gemItem ( ) [inline, virtual]

Definition at line 788 of file gem.h.


Member Function Documentation

virtual void gemItem::Broadcast ( int  clientnum,
bool  control 
) [virtual]
Parameters:
clientnumThe client that initiated this update.
controlSet to true when sent to the controlling client.

Reimplemented from gemActiveObject.

virtual double gemItem::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
) [virtual]

Reimplemented from gemObject.

void gemItem::ClearItemData ( ) [inline]

Definition at line 810 of file gem.h.

virtual float gemItem::GetBaseAdvertiseRange ( ) [virtual]

This value indicates the range that this entity would become visible to other entities if no other modifiers were taken into consideration.

Reimplemented from gemObject.

virtual bool gemItem::GetCanTransform ( ) [virtual]
psItem* gemItem::GetItemData ( ) [inline]

Definition at line 806 of file gem.h.

virtual const char* gemItem::GetObjectType ( ) [inline, virtual]

Reimplemented from gemActiveObject.

Definition at line 802 of file gem.h.

virtual double gemItem::GetProperty ( MathEnvironment env,
const char *  ptr 
) [virtual]

Reimplemented from gemObject.

virtual void gemItem::GetRotation ( float xrotangle,
float yrotangle,
float zrotangle 
) [virtual]

Get the x,y and z axis rotations for the item.

Parameters:
xrotanglethe variable in which the x rotation will be stored
yrotanglethe variable in which the y rotation will be stored
zrotanglethe variable in which the z rotation will be stored
uint32_t gemItem::GetTribeID ( ) [inline]

Definition at line 797 of file gem.h.

virtual bool gemItem::GetVisibility ( ) [virtual]

Reimplemented from gemObject.

virtual bool gemItem::IsConstructible ( ) [virtual]

Reimplemented from gemActiveObject.

virtual bool gemItem::IsContainer ( ) [virtual]

Reimplemented from gemActiveObject.

virtual bool gemItem::IsLockable ( ) [virtual]

Reimplemented from gemActiveObject.

virtual bool gemItem::IsLocked ( ) [virtual]

Reimplemented from gemActiveObject.

virtual bool gemItem::IsPickupable ( ) [virtual]

Gets if the object can be picked up from anyone.

Returns:
TRUE if the object can be picked up from anyone.

Reimplemented from gemActiveObject.

virtual bool gemItem::IsPickupableStrong ( ) [virtual]

Gets if the object can be picked up from anyone according to strong rules.

This is a stronger version.

Returns:
TRUE if the object can be picked up from anyone according to strong rules.

Reimplemented from gemActiveObject.

virtual bool gemItem::IsPickupableWeak ( ) [virtual]

Gets if the object can be picked up from anyone according to weak rules.

This is a weaker version which allows more overriding of the not pickupable status.

Returns:
TRUE if the object can be picked up from anyone according to weak rules.

Reimplemented from gemActiveObject.

virtual bool gemItem::IsSecurityLocked ( ) [virtual]
virtual bool gemItem::IsUsingCD ( ) [virtual]
virtual bool gemItem::Send ( int  clientnum,
bool  control,
bool  to_superclients,
psPersistAllEntities allEntities = NULL 
) [virtual]

Send this object to the given client.

Parameters:
clientnumThe client that initiated this update.
controlSet to true when sent to the controlling client.
to_superclientsSend to super clients
allEntitiesBuffer the message instead of sending it.

Reimplemented from gemActiveObject.

virtual void gemItem::SendBehaviorMessage ( const csString &  str,
gemObject obj 
) [virtual]

Reimplemented from gemActiveObject.

virtual void gemItem::SetPosition ( const csVector3 &  pos,
float  angle,
iSector *  sector,
InstanceID  instance 
) [virtual]

Set position of item in world.

Parameters:
posThe coordinates of the object in the sector
angleThe y rotation angle
sectorThe sector in which the object is
instanceThe instance the object is in
Returns:
Set the position of the item in given sector, instance and position. Also sets the item y rotation
virtual void gemItem::SetRotation ( float  xrotangle,
float  yrotangle,
float  zrotangle 
) [virtual]

Set the x, y and z axis rotations for the item.

Parameters:
xrotanglethe variable used to set the x rotation of the item
yrotanglethe variable used to set the x rotation of the item
zrotanglethe variable used to set the z rotation of the item
void gemItem::SetTribeID ( uint32_t  id) [inline]

Definition at line 793 of file gem.h.


Member Data Documentation

psItem* gemItem::itemdata [protected]

Definition at line 767 of file gem.h.

csString gemItem::itemType [protected]

Definition at line 768 of file gem.h.

uint32_t gemItem::tribeID [protected]

Holds the id of the tribe owning this item (0 if is not tribe-owned)

Definition at line 772 of file gem.h.

float gemItem::xRot [protected]

Definition at line 769 of file gem.h.

float gemItem::yRot [protected]

Definition at line 770 of file gem.h.

float gemItem::zRot [protected]

Definition at line 771 of file gem.h.


The documentation for this class was generated from the following file: