Colobot
|
Base class for all buildings. More...
#include <src/object/subclass/base_building.h>
Public Member Functions | |
CBaseBuilding (int id, ObjectType type) | |
![]() | |
COldObject (int id) | |
void | Simplify () override |
bool | DamageObject (DamageType type, float force=std::numeric_limits< float >::infinity(), CObject *killer=nullptr) override |
Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value) More... | |
void | DestroyObject (DestructionType type, CObject *killer=nullptr) override |
Destroy the object immediately. Use this only if you are 100% sure this is what you want, because object with magnifyDamage=0 should be able to bypass all damage. It's recommended to use CDamageableObject::DamageObject() instead. More... | |
bool | EventProcess (const Event &event) override |
void | UpdateMapping () |
void | DeletePart (int part) override |
void | SetObjectRank (int part, int objRank) |
int | GetObjectRank (int part) override |
void | SetObjectParent (int part, int parent) |
void | SetType (ObjectType type) override |
const char * | GetName () |
int | GetOption () override |
void | Write (CLevelParserLine *line) override |
Writes object properties to line in level file. More... | |
void | Read (CLevelParserLine *line) override |
Reads object properties from line in level file. More... | |
void | SetDrawFront (bool bDraw) override |
int | GetShadowLight () |
void | SetFloorHeight (float height) |
void | FloorAdjust () override |
void | SetLinVibration (Math::Vector dir) override |
Math::Vector | GetLinVibration () |
void | SetCirVibration (Math::Vector dir) override |
Math::Vector | GetCirVibration () |
void | SetTilt (Math::Vector dir) |
Math::Vector | GetTilt () override |
void | SetPartPosition (int part, const Math::Vector &pos) |
Math::Vector | GetPartPosition (int part) const |
void | SetPartRotation (int part, const Math::Vector &angle) |
Math::Vector | GetPartRotation (int part) const |
void | SetPartRotationY (int part, float angle) |
void | SetPartRotationX (int part, float angle) |
void | SetPartRotationZ (int part, float angle) |
float | GetPartRotationY (int part) |
float | GetPartRotationX (int part) |
float | GetPartRotationZ (int part) |
void | SetPartScale (int part, float zoom) |
void | SetPartScale (int part, Math::Vector zoom) |
Math::Vector | GetPartScale (int part) const |
void | SetPartScaleX (int part, float zoom) |
float | GetPartScaleX (int part) |
void | SetPartScaleY (int part, float zoom) |
float | GetPartScaleY (int part) |
void | SetPartScaleZ (int part, float zoom) |
float | GetPartScaleZ (int part) |
void | SetTrainer (bool bEnable) override |
Disables remote control of an object (only programming allowed) More... | |
bool | GetTrainer () override |
Checks if remote control is disabled. More... | |
bool | GetPlusTrainer () |
void | SetToy (bool bEnable) |
bool | GetToy () |
void | SetManual (bool bManual) |
bool | GetManual () |
void | SetMasterParticle (int part, int parti) override |
void | SetTransporter (CObject *transporter) override |
Set transporter object that transports this object. More... | |
CObject * | GetTransporter () override |
Return transported object. More... | |
void | SetTransporterPart (int part) override |
Math::Matrix * | GetRotateMatrix (int part) |
Math::Matrix * | GetWorldMatrix (int part) override |
void | AdjustCamera (Math::Vector &eye, float &dirH, float &dirV, Math::Vector &lookat, Math::Vector &upVec, Gfx::CameraType type) override |
Adjust camera parameters for the given object. More... | |
Character * | GetCharacter () override |
float | GetAbsTime () |
float | GetCapacity () override |
Return capacity of this power container. More... | |
bool | IsRechargeable () override |
Returns true if this power container can be recharged. More... | |
void | SetShield (float level) override |
Set shield level. More... | |
float | GetShield () override |
Get shield level. More... | |
void | SetRange (float delay) override |
Sets jet engine heating speed (bigger = slower, 0 for infinite) More... | |
float | GetRange () override |
Returns jet engine heating speed (bigger = slower, 0 for infinite) More... | |
void | SetReactorRange (float reactorRange) override |
Sets current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot) More... | |
float | GetReactorRange () override |
Returns current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot) More... | |
void | SetTransparency (float value) override |
Sets the transparency of object. More... | |
Math::Sphere | GetJostlingSphere () const override |
bool | JostleObject (float force) override |
void | SetVirusMode (bool bEnable) override |
bool | GetVirusMode () override |
void | SetCameraType (Gfx::CameraType type) override |
Set camera type for this object. More... | |
Gfx::CameraType | GetCameraType () override |
Return camera type for this object. More... | |
void | SetCameraLock (bool lock) override |
Disallow camera changes. More... | |
bool | GetCameraLock () override |
Check if camera changes are disallowed. More... | |
void | SetHighlight (bool highlight) override |
Highlights the object on mouse over. More... | |
void | SetSelect (bool select, bool bDisplayError=true) override |
Selects the object. More... | |
bool | GetSelect () override |
Checks if the object is selected. More... | |
void | SetSelectable (bool bMode) |
bool | GetSelectable () override |
Returns true if the object is selectable. More... | |
void | SetUnderground (bool underground) |
void | SetCheckToken (bool bMode) |
bool | GetCheckToken () |
void | SetMagnifyDamage (float factor) override |
Set damage multiplier for the object (bigger = more damage, weaker shield) More... | |
float | GetMagnifyDamage () override |
Return damage multiplier for the object (bigger = more damage, weaker shield) More... | |
void | SetDamaging (bool damaging) override |
Set the status that means the object is currently taking damage. More... | |
bool | IsDamaging () override |
Is object currently taking damage? More... | |
void | SetDying (DeathType deathType) override |
Set the status that means the object is currently dying. More... | |
DeathType | GetDying () override |
Return object death type. More... | |
bool | IsDying () override |
Is object currently dying? More... | |
bool | GetActive () override |
Is this object active (not dead)? More... | |
bool | GetDetectable () override |
Is this object detectable (not dead and not underground)? More... | |
void | SetGunGoalV (float gunGoal) |
void | SetGunGoalH (float gunGoal) |
float | GetGunGoalV () |
float | GetGunGoalH () |
float | GetShowLimitRadius () override |
Return object operation radius for display after clicking UI button. More... | |
void | CreateSelectParticle () |
CPhysics * | GetPhysics () override |
Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr. More... | |
CMotion * | GetMotion () override |
Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr. More... | |
CAuto * | GetAuto () override |
bool | CreateShadowCircle (float radius, float intensity, Gfx::EngineShadowType type=Gfx::ENG_SHADOW_NORM) |
bool | CreateShadowLight (float height, Gfx::Color color) |
void | FlatParent () override |
void | SetPosition (const Math::Vector &pos) override |
Sets object's position. More... | |
Math::Vector | GetPosition () const override |
Returns object's position. More... | |
void | SetRotation (const Math::Vector &rotation) override |
Sets object's rotation (Euler angles) More... | |
Math::Vector | GetRotation () const override |
Returns object's rotation (Euler angles) More... | |
void | SetScale (const Math::Vector &scale) override |
Sets objects's scale. More... | |
Math::Vector | GetScale () const override |
Returns object's scale. More... | |
void | UpdateInterface () override |
Updates all interface controls. More... | |
void | StopProgram () override |
Stop currently running program. More... | |
bool | GetTraceDown () override |
Is the pencil down? More... | |
void | SetTraceDown (bool down) override |
Put the drawing pencil down. More... | |
TraceColor | GetTraceColor () override |
Return color of the trace. More... | |
void | SetTraceColor (TraceColor color) override |
Set color of the trace. More... | |
float | GetTraceWidth () override |
Return trace width. More... | |
void | SetTraceWidth (float width) override |
Set trace width. More... | |
bool | IsRepairable () override |
Returns true if this object can be repaired in RepairStation. More... | |
float | GetShieldFullRegenTime () override |
Return time (in seconds) required for full shield regeneration. More... | |
float | GetLightningHitProbability () override |
Returns the distance modifier for CLightning, used to modify hit probability. Value in range [0..1], where 0 is never and 1 is normal probability. More... | |
void | SetBulletWall (bool bulletWall) |
bool | IsBulletWall () override |
int | MapPseudoSlot (Pseudoslot pseudoslot) override |
Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object. More... | |
int | GetNumSlots () override |
Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game. More... | |
Math::Vector | GetSlotPosition (int slotNum) override |
Get relative position of a slot. More... | |
float | GetSlotAngle (int slotNum) override |
Get relative angle (in radians) where robot should be positioned when inserting into a slot. More... | |
float | GetSlotAcceptanceAngle (int slotNum) override |
Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot. More... | |
CObject * | GetSlotContainedObject (int slotNum) override |
Get object contained in a slot. More... | |
void | SetSlotContainedObject (int slotNum, CObject *object) override |
Set object contained in a slot. More... | |
void | SetPowerPosition (const Math::Vector &powerPosition) |
virtual void | SetScale (const Math::Vector &scale) |
Sets objects's scale. More... | |
void | SetScale (float scale) |
Sets objects's scale (uniform value) More... | |
![]() | |
CObject (const CObject &)=delete | |
CObject & | operator= (const CObject &)=delete |
ObjectType | GetType () const |
Returns object type. More... | |
int | GetID () const |
Returns object's unique id. More... | |
virtual void | Write (CLevelParserLine *line)=0 |
Writes object properties to line in level file. More... | |
virtual void | Read (CLevelParserLine *line)=0 |
Reads object properties from line in level file. More... | |
virtual void | UpdateInterface () |
Updates all interface controls. More... | |
bool | Implements (ObjectInterfaceType type) const |
Check if object implements the given type of interface. More... | |
virtual Math::Vector | GetPosition () const |
Returns object's position. More... | |
virtual void | SetPosition (const Math::Vector &pos) |
Sets object's position. More... | |
virtual Math::Vector | GetRotation () const |
Returns object's rotation (Euler angles) More... | |
virtual void | SetRotation (const Math::Vector &rotation) |
Sets object's rotation (Euler angles) More... | |
virtual Math::Vector | GetScale () const |
Returns object's scale. More... | |
virtual void | SetScale (const Math::Vector &scale) |
Sets objects's scale. More... | |
void | SetScale (float scale) |
Sets objects's scale (uniform value) More... | |
void | SetCrashSpheres (const std::vector< Gfx::ModelCrashSphere > &crashSpheres) |
Sets crash spheres for object. More... | |
void | AddCrashSphere (const CrashSphere &crashSphere) |
Adds a new crash sphere. More... | |
int | GetCrashSphereCount () |
Returns total number of crash spheres. More... | |
CrashSphere | GetFirstCrashSphere () |
Returns the first crash sphere (assumes it exists) More... | |
std::vector< CrashSphere > | GetAllCrashSpheres () |
Returns all crash spheres. More... | |
void | DeleteAllCrashSpheres () |
Removes all crash spheres. More... | |
bool | CanCollideWith (CObject *other) |
Returns true if this object can collide with the other one. More... | |
Math::Sphere | GetCameraCollisionSphere () |
Returns sphere used to test for camera collisions. More... | |
void | SetCameraCollisionSphere (const Math::Sphere &sphere) |
Sets sphere used to test for camera collisions. More... | |
virtual void | SetTransparency (float value)=0 |
Sets the transparency of object. More... | |
void | SetAnimateOnReset (bool animateOnReset) |
Sets flag controlling animation effect on level reset. More... | |
bool | GetAnimateOnReset () |
Returns flag controlling animation effect on level reset. More... | |
void | SetCollisions (bool collisions) |
Turns object collisions on/off. More... | |
bool | GetCollisions () |
Returns true if collisions are enabled. More... | |
void | SetTeam (int team) |
Sets object team (shouldn't be called after creation because the model won't update!) More... | |
int | GetTeam () |
Returns object team. More... | |
void | SetProxyActivate (bool activate) |
Enable object activation only after you come close. More... | |
bool | GetProxyActivate () |
Returns close activation mode. More... | |
void | SetProxyDistance (float distance) |
Sets distance for close activation. More... | |
float | GetProxyDistance () |
Returns distance for close activation. More... | |
CBot::CBotVar * | GetBotVar () |
Returns CBot "object" variable associated with this object. More... | |
std::string | GetTooltipText () |
Returns tooltip text for an object. More... | |
void | SetLock (bool lock) |
Set "lock" mode of an object (for example, a robot while it's being factored, or a building while it's built) More... | |
bool | GetLock () |
Return "lock" mode of an object. More... | |
virtual bool | GetActive () |
Is this object active (not dead)? More... | |
virtual bool | GetDetectable () |
Is this object detectable (not dead and not underground)? More... | |
virtual bool | IsBulletWall () |
void | SetRotationX (float angle) |
void | SetRotationY (float angle) |
void | SetRotationZ (float angle) |
float | GetRotationX () |
float | GetRotationY () |
float | GetRotationZ () |
void | SetScaleX (float angle) |
void | SetScaleY (float angle) |
void | SetScaleZ (float angle) |
float | GetScaleX () |
float | GetScaleY () |
float | GetScaleZ () |
virtual void | Simplify () |
virtual void | DeletePart (int part) |
virtual void | SetType (ObjectType type) |
virtual int | GetObjectRank (int part) |
virtual int | GetOption () |
virtual void | SetDrawFront (bool bDraw) |
virtual void | FloorAdjust () |
virtual void | SetLinVibration (Math::Vector dir) |
virtual void | SetCirVibration (Math::Vector dir) |
virtual Math::Vector | GetTilt () |
virtual void | SetMasterParticle (int part, int parti) |
virtual Math::Matrix * | GetWorldMatrix (int part) |
virtual Character * | GetCharacter () |
virtual void | FlatParent () |
virtual void | SetVirusMode (bool bEnable) |
virtual bool | GetVirusMode () |
virtual CAuto * | GetAuto () |
![]() | |
CInteractiveObject (ObjectInterfaceTypes &types) | |
virtual bool | EventProcess (const Event &event)=0 |
![]() | |
CTransportableObject (ObjectInterfaceTypes &types) | |
virtual void | SetTransporter (CObject *transporter)=0 |
Set transporter object that transports this object. More... | |
virtual CObject * | GetTransporter ()=0 |
Return transported object. More... | |
virtual void | SetTransporterPart (int part)=0 |
bool | IsBeingTransported () |
Return true if the object is currently transported. More... | |
![]() | |
CTaskExecutorObjectImpl (ObjectInterfaceTypes &types, CObject *object) | |
bool | EventProcess (const Event &event) |
bool | IsForegroundTask () override |
Is executing foreground task? More... | |
bool | IsBackgroundTask () override |
Is executing background task? More... | |
CForegroundTask * | GetForegroundTask () override |
Return the foreground task. More... | |
CBackgroundTask * | GetBackgroundTask () override |
Return the background task. More... | |
void | StopForegroundTask () override |
Stop foreground task. More... | |
void | StopBackgroundTask () override |
Stop background task. More... | |
Error | StartTaskTake () override |
Start a foreground task. More... | |
Error | StartTaskManip (TaskManipOrder order, TaskManipArm arm) override |
Error | StartTaskFlag (TaskFlagOrder order, int rank) override |
Error | StartTaskBuild (ObjectType type) override |
Error | StartTaskSearch () override |
Error | StartTaskDeleteMark () override |
Error | StartTaskTerraform () override |
Error | StartTaskRecover () override |
Error | StartTaskFire (float delay) override |
Error | StartTaskFireAnt (Math::Vector impact) override |
Error | StartTaskSpiderExplo () override |
Error | StartTaskPen (bool down, TraceColor color=TraceColor::Default) override |
Error | StartTaskWait (float time) override |
Start a foreground task (scriptable tasks, not in UI) More... | |
Error | StartTaskAdvance (float length) override |
Error | StartTaskTurn (float angle) override |
Error | StartTaskGoto (Math::Vector pos, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode) override |
Error | StartTaskInfo (const char *name, float value, float power, bool bSend) override |
Error | StartTaskShield (TaskShieldMode mode, float delay=1000.0f) override |
Starts a background task. More... | |
Error | StartTaskGunGoal (float dirV, float dirH) override |
![]() | |
CTaskExecutorObject (ObjectInterfaceTypes &types) | |
virtual Error | StartTaskTake ()=0 |
Start a foreground task. More... | |
virtual Error | StartTaskManip (TaskManipOrder order, TaskManipArm arm)=0 |
virtual Error | StartTaskFlag (TaskFlagOrder order, int rank)=0 |
virtual Error | StartTaskBuild (ObjectType type)=0 |
virtual Error | StartTaskSearch ()=0 |
virtual Error | StartTaskDeleteMark ()=0 |
virtual Error | StartTaskTerraform ()=0 |
virtual Error | StartTaskRecover ()=0 |
virtual Error | StartTaskFire (float delay)=0 |
virtual Error | StartTaskFireAnt (Math::Vector impact)=0 |
virtual Error | StartTaskSpiderExplo ()=0 |
virtual Error | StartTaskPen (bool down, TraceColor color=TraceColor::Default)=0 |
virtual Error | StartTaskWait (float time)=0 |
Start a foreground task (scriptable tasks, not in UI) More... | |
virtual Error | StartTaskAdvance (float length)=0 |
virtual Error | StartTaskTurn (float angle)=0 |
virtual Error | StartTaskGoto (Math::Vector pos, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode)=0 |
virtual Error | StartTaskInfo (const char *name, float value, float power, bool bSend)=0 |
virtual Error | StartTaskShield (TaskShieldMode mode, float delay=1000.0f)=0 |
Starts a background task. More... | |
virtual Error | StartTaskGunGoal (float dirV, float dirH)=0 |
virtual bool | IsForegroundTask ()=0 |
Is executing foreground task? More... | |
virtual bool | IsBackgroundTask ()=0 |
Is executing background task? More... | |
virtual CForegroundTask * | GetForegroundTask ()=0 |
Return the foreground task. More... | |
virtual CBackgroundTask * | GetBackgroundTask ()=0 |
Return the background task. More... | |
virtual void | StopForegroundTask ()=0 |
Stop foreground task. More... | |
virtual void | StopBackgroundTask ()=0 |
Stop background task. More... | |
![]() | |
CProgramStorageObjectImpl (ObjectInterfaceTypes &types, CObject *object) | |
bool | IntroduceVirus () override |
void | SetActiveVirus (bool bActive) override |
bool | GetActiveVirus () override |
Checks virus active status. More... | |
bool | ReadProgram (Program *program, const std::string &filename) override |
Read program from a given file. More... | |
bool | WriteProgram (Program *program, const std::string &filename) override |
Write program to a given file. More... | |
bool | GetCompile (Program *program) override |
Check if program was compiled successfully. More... | |
Program * | AddProgram () override |
Add a new program. More... | |
void | AddProgram (std::unique_ptr< Program > program) override |
Add given program to the program list stored in this robot. More... | |
void | RemoveProgram (Program *program) override |
Remove program. More... | |
Program * | CloneProgram (Program *program) override |
Clone a program. More... | |
std::vector< std::unique_ptr< Program > > & | GetPrograms () override |
Return a std::vector of all available programs. More... | |
int | GetProgramCount () override |
Return count of all programs. More... | |
Program * | GetProgram (int index) override |
Return program with the given index. More... | |
Program * | GetOrAddProgram (int index) override |
Return program at the given index (creating it and all previous ones as needed) More... | |
int | GetProgramIndex (Program *program) override |
Return index in the list of given Program instance. More... | |
void | SetProgramStorageIndex (int programStorageIndex) override |
Set index for use in filename for saved programs (-1 to disable) More... | |
int | GetProgramStorageIndex () override |
Return index that is used while saving programs. More... | |
void | SaveAllUserPrograms (const std::string &userSource) override |
Save all user programs. More... | |
void | LoadAllProgramsForLevel (CLevelParserLine *levelSource, const std::string &userSource, bool loadSoluce) override |
Load all programs when loading the level including previously saved user programs. More... | |
void | SaveAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override |
Save all programs when saving the saved scene. More... | |
void | LoadAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override |
Load all programs when loading the saved scene. More... | |
![]() | |
CProgramStorageObject (ObjectInterfaceTypes &types) | |
virtual bool | IntroduceVirus ()=0 |
virtual void | SetActiveVirus (bool bActive)=0 |
virtual bool | GetActiveVirus ()=0 |
Checks virus active status. More... | |
virtual bool | ReadProgram (Program *program, const std::string &filename)=0 |
Read program from a given file. More... | |
virtual bool | WriteProgram (Program *program, const std::string &filename)=0 |
Write program to a given file. More... | |
virtual bool | GetCompile (Program *program)=0 |
Check if program was compiled successfully. More... | |
virtual Program * | AddProgram ()=0 |
Add a new program. More... | |
virtual void | AddProgram (std::unique_ptr< Program > program)=0 |
Add given program to the program list stored in this robot. More... | |
virtual void | RemoveProgram (Program *program)=0 |
Remove program. More... | |
virtual Program * | CloneProgram (Program *program)=0 |
Clone a program. More... | |
virtual std::vector< std::unique_ptr< Program > > & | GetPrograms ()=0 |
Return a std::vector of all available programs. More... | |
virtual int | GetProgramCount ()=0 |
Return count of all programs. More... | |
virtual Program * | GetProgram (int index)=0 |
Return program with the given index. More... | |
virtual Program * | GetOrAddProgram (int index)=0 |
Return program at the given index (creating it and all previous ones as needed) More... | |
virtual int | GetProgramIndex (Program *program)=0 |
Return index in the list of given Program instance. More... | |
virtual void | SetProgramStorageIndex (int programStorageIndex)=0 |
Set index for use in filename for saved programs (-1 to disable) More... | |
virtual int | GetProgramStorageIndex ()=0 |
Return index that is used while saving programs. More... | |
virtual void | SaveAllUserPrograms (const std::string &userSource)=0 |
Save all user programs. More... | |
virtual void | LoadAllProgramsForLevel (CLevelParserLine *levelSource, const std::string &userSource, bool loadSoluce)=0 |
Load all programs when loading the level including previously saved user programs. More... | |
virtual void | SaveAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource)=0 |
Save all programs when saving the saved scene. More... | |
virtual void | LoadAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource)=0 |
Load all programs when loading the saved scene. More... | |
![]() | |
CProgrammableObjectImpl (ObjectInterfaceTypes &types, CObject *object) | |
bool | EventProcess (const Event &event) |
bool | IsProgram () override |
Check if a program is running. More... | |
void | RunProgram (Program *program) override |
Start a program. More... | |
Program * | GetCurrentProgram () override |
Returns the currently running program, or nullptr if no program is running. More... | |
void | StopProgram () override |
Stop currently running program. More... | |
bool | ReadStack (std::istream &istr) override |
Read current execution status from file. More... | |
bool | WriteStack (std::ostream &ostr) override |
Save current execution status to file. More... | |
void | TraceRecordStart () override |
Start recording trace. More... | |
void | TraceRecordStop () override |
Stop recording trace and generate CBot program. More... | |
bool | IsTraceRecord () override |
Returns true if trace recording is in progress. More... | |
void | SetActivity (bool activity) override |
Management of object "activity" (temporairly stops program execution, right now used only by Aliens in eggs) More... | |
bool | GetActivity () override |
void | SetCmdLine (unsigned int rank, float value) |
float | GetCmdLine (unsigned int rank) override |
Returns program cmdline values for an object. More... | |
std::vector< float > & | GetCmdLine () |
![]() | |
CProgrammableObject (ObjectInterfaceTypes &types) | |
virtual void | RunProgram (Program *program)=0 |
Start a program. More... | |
virtual void | StopProgram ()=0 |
Stop currently running program. More... | |
virtual Program * | GetCurrentProgram ()=0 |
Returns the currently running program, or nullptr if no program is running. More... | |
virtual bool | IsProgram ()=0 |
Check if a program is running. More... | |
virtual bool | WriteStack (std::ostream &ostr)=0 |
Save current execution status to file. More... | |
virtual bool | ReadStack (std::istream &istr)=0 |
Read current execution status from file. More... | |
virtual void | TraceRecordStart ()=0 |
Start recording trace. More... | |
virtual void | TraceRecordStop ()=0 |
Stop recording trace and generate CBot program. More... | |
virtual bool | IsTraceRecord ()=0 |
Returns true if trace recording is in progress. More... | |
virtual void | SetActivity (bool bMode)=0 |
Management of object "activity" (temporairly stops program execution, right now used only by Aliens in eggs) More... | |
virtual bool | GetActivity ()=0 |
virtual float | GetCmdLine (unsigned int rank)=0 |
Returns program cmdline values for an object. More... | |
![]() | |
CJostleableObject (ObjectInterfaceTypes &types) | |
virtual Math::Sphere | GetJostlingSphere () const =0 |
virtual bool | JostleObject (float force)=0 |
![]() | |
CSlottedObject (ObjectInterfaceTypes &types) | |
virtual int | MapPseudoSlot (Pseudoslot pseudoslot)=0 |
Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object. More... | |
virtual int | GetNumSlots ()=0 |
Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game. More... | |
virtual Math::Vector | GetSlotPosition (int slotNum)=0 |
Get relative position of a slot. More... | |
virtual float | GetSlotAngle (int slotNum)=0 |
Get relative angle (in radians) where robot should be positioned when inserting into a slot. More... | |
virtual float | GetSlotAcceptanceAngle (int slotNum)=0 |
Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot. More... | |
virtual CObject * | GetSlotContainedObject (int slotNum)=0 |
Get object contained in a slot. More... | |
virtual void | SetSlotContainedObject (int slotNum, CObject *object)=0 |
Set object contained in a slot. More... | |
void | SetSlotContainedObjectReq (Pseudoslot pseudoslot, CObject *object) |
CObject * | GetSlotContainedObjectOpt (Pseudoslot pseudoslot) |
CObject * | GetSlotContainedObjectReq (Pseudoslot pseudoslot) |
![]() | |
CJetFlyingObject (ObjectInterfaceTypes &types) | |
virtual void | SetRange (float range)=0 |
Sets jet engine heating speed (bigger = slower, 0 for infinite) More... | |
virtual float | GetRange ()=0 |
Returns jet engine heating speed (bigger = slower, 0 for infinite) More... | |
virtual void | SetReactorRange (float reactorRange)=0 |
Sets current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot) More... | |
virtual float | GetReactorRange ()=0 |
Returns current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot) More... | |
![]() | |
CFlyingObject (ObjectInterfaceTypes &types) | |
![]() | |
CMovableObject (ObjectInterfaceTypes &types) | |
virtual CPhysics * | GetPhysics ()=0 |
Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr. More... | |
virtual CMotion * | GetMotion ()=0 |
Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr. More... | |
![]() | |
CControllableObject (ObjectInterfaceTypes &types) | |
virtual void | SetTrainer (bool trainer)=0 |
Disables remote control of an object (only programming allowed) More... | |
virtual bool | GetTrainer ()=0 |
Checks if remote control is disabled. More... | |
virtual void | SetSelect (bool select, bool bDisplayError=true)=0 |
Selects the object. More... | |
virtual bool | GetSelect ()=0 |
Checks if the object is selected. More... | |
virtual bool | GetSelectable ()=0 |
Returns true if the object is selectable. More... | |
virtual void | SetHighlight (bool highlight)=0 |
Highlights the object on mouse over. More... | |
virtual void | SetCameraType (Gfx::CameraType type)=0 |
Set camera type for this object. More... | |
virtual Gfx::CameraType | GetCameraType ()=0 |
Return camera type for this object. More... | |
virtual void | SetCameraLock (bool lock)=0 |
Disallow camera changes. More... | |
virtual bool | GetCameraLock ()=0 |
Check if camera changes are disallowed. More... | |
virtual void | AdjustCamera (Math::Vector &eye, float &dirH, float &dirV, Math::Vector &lookat, Math::Vector &upVec, Gfx::CameraType type)=0 |
Adjust camera parameters for the given object. More... | |
![]() | |
CPowerContainerObjectImpl (ObjectInterfaceTypes &types) | |
void | SetEnergyLevel (float level) override |
Set energy level (percentage), value in range [0..1]. More... | |
float | GetEnergyLevel () override |
Get energy level (percentage), value in range [0..1]. More... | |
![]() | |
CPowerContainerObject (ObjectInterfaceTypes &types) | |
virtual void | SetEnergyLevel (float level)=0 |
Set energy level (percentage), value in range [0..1]. More... | |
virtual float | GetEnergyLevel ()=0 |
Get energy level (percentage), value in range [0..1]. More... | |
virtual void | SetEnergy (float energy) |
Set amount of energy in the container, value in range [0..GetCapacity()]. More... | |
virtual float | GetEnergy () |
Get amount of energy in the container, value in range [0..GetCapacity()]. More... | |
virtual float | GetCapacity ()=0 |
Return capacity of this power container. More... | |
virtual bool | IsRechargeable ()=0 |
Returns true if this power container can be recharged. More... | |
![]() | |
CRangedObject (ObjectInterfaceTypes &types) | |
virtual float | GetShowLimitRadius ()=0 |
Return object operation radius for display after clicking UI button. More... | |
![]() | |
CTraceDrawingObject (ObjectInterfaceTypes &types) | |
virtual void | SetTraceDown (bool down)=0 |
Put the drawing pencil down. More... | |
virtual bool | GetTraceDown ()=0 |
Is the pencil down? More... | |
virtual void | SetTraceColor (TraceColor color)=0 |
Set color of the trace. More... | |
virtual TraceColor | GetTraceColor ()=0 |
Return color of the trace. More... | |
virtual void | SetTraceWidth (float width)=0 |
Set trace width. More... | |
virtual float | GetTraceWidth ()=0 |
Return trace width. More... | |
![]() | |
CShieldedAutoRegenObject (ObjectInterfaceTypes &types) | |
virtual float | GetShieldFullRegenTime ()=0 |
Return time (in seconds) required for full shield regeneration. More... | |
![]() | |
CShieldedObject (ObjectInterfaceTypes &types) | |
virtual void | SetShield (float level)=0 |
Set shield level. More... | |
virtual float | GetShield ()=0 |
Get shield level. More... | |
virtual void | SetMagnifyDamage (float factor)=0 |
Set damage multiplier for the object (bigger = more damage, weaker shield) More... | |
virtual float | GetMagnifyDamage ()=0 |
Return damage multiplier for the object (bigger = more damage, weaker shield) More... | |
virtual bool | IsRepairable ()=0 |
Returns true if this object can be repaired in RepairStation. More... | |
![]() | |
CDestroyableObject (ObjectInterfaceTypes &types) | |
virtual void | DestroyObject (DestructionType type, CObject *killer=nullptr)=0 |
Destroy the object immediately. Use this only if you are 100% sure this is what you want, because object with magnifyDamage=0 should be able to bypass all damage. It's recommended to use CDamageableObject::DamageObject() instead. More... | |
virtual float | GetLightningHitProbability ()=0 |
Returns the distance modifier for CLightning, used to modify hit probability. Value in range [0..1], where 0 is never and 1 is normal probability. More... | |
virtual void | SetDying (DeathType deathType)=0 |
Set the status that means the object is currently dying. More... | |
virtual DeathType | GetDying ()=0 |
Return object death type. More... | |
virtual bool | IsDying ()=0 |
Is object currently dying? More... | |
![]() | |
CDamageableObject (ObjectInterfaceTypes &types) | |
virtual bool | DamageObject (DamageType type, float force=std::numeric_limits< float >::infinity(), CObject *killer=nullptr)=0 |
Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value) More... | |
virtual void | SetDamaging (bool damaging)=0 |
Set the status that means the object is currently taking damage. More... | |
virtual bool | IsDamaging ()=0 |
Is object currently taking damage? More... | |
Static Public Member Functions | |
static std::unique_ptr< CBaseBuilding > | Create (const ObjectCreateParams ¶ms, Gfx::COldModelManager *modelManager, Gfx::CEngine *engine) |
![]() | |
static ObjectCreateParams | ReadCreateParams (CLevelParserLine *line) |
Reads params required for object creation. More... | |
Additional Inherited Members | |
![]() | |
enum class | Pseudoslot { POWER , CARRYING } |
! Object-independent identifiers for certain special slots More... | |
![]() | |
void | DeleteObject (bool bAll=false) |
void | SetProgrammable () |
void | SetMovable (std::unique_ptr< CMotion > motion, std::unique_ptr< CPhysics > physics) |
void | SetAuto (std::unique_ptr< CAuto > automat) |
void | SetOption (int option) |
void | SetJostlingSphere (const Math::Sphere &jostlingSphere) |
bool | EventFrame (const Event &event) |
void | VirusFrame (float rTime) |
void | PartiFrame (float rTime) |
void | InitPart (int part) |
void | UpdateTotalPart () |
int | SearchDescendant (int parent, int n) |
void | UpdateEnergyMapping () |
bool | UpdateTransformObject (int part, bool bForceUpdate) |
bool | UpdateTransformObject () |
void | UpdateSelectParticle () |
void | TransformCrashSphere (Math::Sphere &crashSphere) override |
Transform crash sphere by object's world matrix. More... | |
void | TransformCameraCollisionSphere (Math::Sphere &collisionSphere) override |
Transform crash sphere by object's world matrix. More... | |
![]() | |
CObject (int id, ObjectType type) | |
Constructor only accessible to subclasses. More... | |
virtual void | TransformCrashSphere (Math::Sphere &crashSphere)=0 |
Transform crash sphere by object's world matrix. More... | |
virtual void | TransformCameraCollisionSphere (Math::Sphere &collisionSphere)=0 |
Transform crash sphere by object's world matrix. More... | |
![]() | |
static bool | IsSelectableByDefault (ObjectType type) |
Check if given object type should be selectable by default. More... | |
static bool | IsBulletWallByDefault (ObjectType type) |
Check if given object type should have bulletWall enabled by default. More... | |
![]() | |
Gfx::CEngine * | m_engine |
Gfx::CLightManager * | m_lightMan |
Gfx::CTerrain * | m_terrain |
Gfx::CCamera * | m_camera |
Gfx::CParticle * | m_particle |
CRobotMain * | m_main |
CSoundInterface * | m_sound |
std::unique_ptr< CPhysics > | m_physics |
std::unique_ptr< CMotion > | m_motion |
std::unique_ptr< CAuto > | m_auto |
std::unique_ptr< Ui::CObjectInterface > | m_objectInterface |
std::string | m_name |
Character | m_character |
int | m_option |
int | m_shadowLight |
float | m_shadowHeight |
Math::Vector | m_linVibration |
Math::Vector | m_cirVibration |
Math::Vector | m_tilt |
CObject * | m_power |
Math::Vector | m_powerPosition |
CObject * | m_cargo |
CObject * | m_transporter |
int | m_transporterLink |
float | m_lastEnergy |
float | m_shield |
float | m_range |
float | m_aTime |
float | m_shotTime |
bool | m_bVirusMode |
float | m_virusTime |
float | m_lastVirusParticle |
bool | m_bSelect |
bool | m_bSelectable |
bool | m_bCheckToken |
bool | m_underground |
bool | m_damaging |
float | m_damageTime |
DeathType | m_dying |
bool | m_bFlat |
bool | m_bTrainer |
bool | m_bToy |
bool | m_bManual |
float | m_gunGoalV |
float | m_gunGoalH |
Gfx::CameraType | m_cameraType |
bool | m_bCameraLock |
float | m_magnifyDamage |
Math::Sphere | m_jostlingSphere |
float | m_shieldRadius |
int | m_totalPart |
ObjectPart | m_objectPart [OBJECTMAXPART] |
int | m_partiSel [4] |
EventType | m_buttonAxe |
float | m_time |
float | m_burnTime |
float | m_reactorRange |
bool | m_traceDown |
TraceColor | m_traceColor |
float | m_traceWidth |
bool | m_bulletWall = false |
bool | m_hasCargoSlot |
bool | m_hasPowerSlot |
![]() | |
const int | m_id |
unique identifier More... | |
ObjectType | m_type |
object type More... | |
ObjectInterfaceTypes | m_implementedInterfaces |
interfaces that the object implements More... | |
Math::Vector | m_position |
Math::Vector | m_rotation |
Math::Vector | m_scale |
std::vector< CrashSphere > | m_crashSpheres |
crash spheres More... | |
Math::Sphere | m_cameraCollisionSphere |
bool | m_animateOnReset |
bool | m_collisions |
int | m_team |
bool | m_proxyActivate |
float | m_proxyDistance |
CBot::CBotVar * | m_botVar |
bool | m_lock |
![]() | |
std::unique_ptr< CForegroundTask > | m_foregroundTask |
std::unique_ptr< CBackgroundTask > | m_backgroundTask |
Base class for all buildings.