EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AsteroidSE Class Reference

#include "Asteroid.h"

Inheritance diagram for AsteroidSE:
Collaboration diagram for AsteroidSE:

Public Member Functions

 AsteroidSE (InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
 
virtual ~AsteroidSE ()
 
virtual AsteroidSEGetAsteroidSE ()
 
virtual bool IsAsteroidSE ()
 
virtual void Delete ()
 
virtual void Process ()
 
virtual void EncodeDestiny (Buffer &into)
 
virtual void MakeDamageState (DoDestinyDamageState &into)
 
void Grow ()
 
void SetMgr (BeltMgr *beltMgr, uint32 beltID)
 
- Public Member Functions inherited from ObjectSystemEntity
 ObjectSystemEntity (InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
 
virtual ~ObjectSystemEntity ()
 
virtual ObjectSystemEntityGetObjectSE ()
 
virtual bool IsInanimateSE ()
 
virtual bool IsObjectEntity ()
 
virtual void UpdateDamage ()
 
virtual PyDictMakeSlimItem ()
 
virtual void Killed (Damage &fatal_blow)
 
virtual bool IsInvul ()
 
void SetInvul (bool invul=false)
 
- Public Member Functions inherited from SystemEntity
 SystemEntity (InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
 
virtual ~SystemEntity ()
 
virtual bool ProcessTic ()
 
virtual SystemEntityGetSE ()
 
virtual StaticSystemEntityGetStaticSE ()
 
virtual StationSEGetStationSE ()
 
virtual PlanetSEGetPlanetSE ()
 
virtual MoonSEGetMoonSE ()
 
virtual StargateSEGetGateSE ()
 
virtual BeltSEGetBeltSE ()
 
virtual ItemSystemEntityGetItemSE ()
 
virtual ContainerSEGetContSE ()
 
virtual WreckSEGetWreckSE ()
 
virtual AnomalySEGetAnomalySE ()
 
virtual WormholeSEGetWormholeSE ()
 
virtual FieldSEGetFieldSE ()
 
virtual ProbeSEGetProbeSE ()
 
virtual StructureSEGetPOSSE ()
 
virtual StructureSEGetJammerSE ()
 
virtual JumpBridgeSEGetJumpBridgeSE ()
 
virtual StructureSEGetOutpostSE ()
 
virtual TowerSEGetTowerSE ()
 
virtual ArraySEGetArraySE ()
 
virtual WeaponSEGetWeaponSE ()
 
virtual BatterySEGetBatterySE ()
 
virtual DeployableSEGetDeployableSE ()
 
virtual SentryGetSentrySE ()
 
virtual ModuleSEGetModuleSE ()
 
virtual ReactorSEGetReactorSE ()
 
virtual CustomsSEGetCOSE ()
 
virtual TCUSEGetTCUSE ()
 
virtual SBUSEGetSBUSE ()
 
virtual IHubSEGetIHubSE ()
 
virtual DynamicSystemEntityGetDynamicSE ()
 
virtual NPCGetNPCSE ()
 
virtual DroneSEGetDroneSE ()
 
virtual MissileGetMissileSE ()
 
virtual ShipSEGetShipSE ()
 
virtual ConcordGetConcordSE ()
 
virtual bool isGlobal ()
 
virtual bool IsSystemEntity ()
 
virtual bool IsStaticEntity ()
 
virtual bool IsBeltSE ()
 
virtual bool IsGateSE ()
 
virtual bool IsPlanetSE ()
 
virtual bool IsMoonSE ()
 
virtual bool IsStationSE ()
 
virtual bool IsItemEntity ()
 
virtual bool IsAnomalySE ()
 
virtual bool IsWormholeSE ()
 
virtual bool IsCelestialSE ()
 
virtual bool IsContainerSE ()
 
virtual bool IsFieldSE ()
 
virtual bool IsProbeSE ()
 
virtual bool IsSentrySE ()
 
virtual bool IsPOSSE ()
 
virtual bool IsCOSE ()
 
virtual bool IsTCUSE ()
 
virtual bool IsSBUSE ()
 
virtual bool IsIHubSE ()
 
virtual bool IsTowerSE ()
 
virtual bool IsArraySE ()
 
virtual bool IsJammerSE ()
 
virtual bool IsWeaponSE ()
 
virtual bool IsBatterySE ()
 
virtual bool IsModuleSE ()
 
virtual bool IsMoonMiner ()
 
virtual bool IsOutpostSE ()
 
virtual bool IsDeployableSE ()
 
virtual bool IsJumpBridgeSE ()
 
virtual bool IsReactorSE ()
 
virtual bool IsOperSE ()
 
virtual bool IsDynamicEntity ()
 
virtual bool IsLogin ()
 
virtual bool IsFrozen ()
 
virtual bool IsNPCSE ()
 
virtual bool IsDroneSE ()
 
virtual bool IsWreckSE ()
 
virtual bool IsMissileSE ()
 
virtual bool IsShipSE ()
 
virtual bool IsConcord ()
 
PyServiceMgrGetServices ()
 
SystemBubbleSysBubble ()
 
SystemManagerSystemMgr ()
 
TargetManagerTargetMgr ()
 
DestinyManagerDestinyMgr ()
 
InventoryItemRef GetSelf ()
 
uint16 GetTypeID ()
 
uint32 GetGroupID ()
 
uint8 GetCategoryID ()
 
EVEItemFlags GetFlag ()
 
uint32 GetID ()
 
double GetRadius ()
 
uint32 GetLocationID ()
 
const char * GetName () const
 
const GPointGetPosition () const
 
void SetPosition (const GPoint &pos)
 
double x ()
 
double y ()
 
double z ()
 
int32 GetAllianceID ()
 
int32 GetWarFactionID ()
 
uint32 GetCorporationID ()
 
uint32 GetOwnerID ()
 
uint32 GetFleetID ()
 
void SetFleetID (uint32 set)
 
int8 GetHarmonic ()
 
void SetHarmonic (int8 set)
 
void DropLoot (WreckContainerRef wreckRef, uint32 groupID, uint32 owner)
 
void AwardSecurityStatus (InventoryItemRef iRef, Character *pChar)
 
void SendDamageStateChanged ()
 
bool ApplyDamage (Damage &d)
 
double DistanceTo2 (const SystemEntity *other)
 
PyTupleMakeDamageState ()
 
virtual void Abandon ()
 
const bool IsDead ()
 
const GVectorGetVelocity ()
 
virtual void MissileLaunched (Missile *pMissile)
 
virtual bool LoadExtras ()
 
virtual void SetPilot (Client *pClient)
 
virtual bool HasPilot ()
 
virtual ClientGetPilot ()
 

Private Attributes

BeltMgrm_beltMgr
 
Timer m_growTimer
 
uint32 m_beltID
 

Additional Inherited Members

- Protected Attributes inherited from SystemEntity
SystemBubblem_bubble
 
SystemManagerm_system
 
TargetManagerm_targMgr
 
DestinyManagerm_destiny
 
PyServiceMgrm_services
 
InventoryItemRef m_self
 
bool m_killed
 
double m_radius
 
int32 m_harmonic
 
int32 m_warID
 
int32 m_allyID
 
uint32 m_corpID
 
uint32 m_fleetID
 
uint32 m_ownerID
 

Detailed Description

ObjectSystemEntity which represents asteroid object in space

Definition at line 82 of file Asteroid.h.

Constructor & Destructor Documentation

AsteroidSE::AsteroidSE ( InventoryItemRef  self,
PyServiceMgr services,
SystemManager system 
)

Definition at line 74 of file Asteroid.cpp.

References Timer::Disable(), and m_growTimer.

75 : ObjectSystemEntity(self, services, system),
76 m_growTimer(sConfig.cosmic.BeltGrowth *60 *60 *1000) // hours->ms
77 {
79 }
#define sConfig
A macro for easier access to the singleton.
void Disable()
Definition: timer.h:39
Timer m_growTimer
Definition: Asteroid.h:108
ObjectSystemEntity(InventoryItemRef self, PyServiceMgr &services, SystemManager *system)

Here is the call graph for this function:

virtual AsteroidSE::~AsteroidSE ( )
inlinevirtual

Definition at line 87 of file Asteroid.h.

87 { /* Do nothing here */ }

Member Function Documentation

void AsteroidSE::Delete ( )
virtual

Reimplemented from SystemEntity.

Definition at line 134 of file Asteroid.cpp.

References _log, SystemEntity::Delete(), InventoryItem::itemID(), m_beltID, m_beltMgr, SystemEntity::m_self, InventoryItem::name(), and BeltMgr::RemoveAsteroid().

135 {
136  _log(SPAWN__DEPOP, "AsteroidSE::Delete() - Removing asteroid %s(%u) from beltID %u", \
137  m_self->name(), m_self->itemID(), m_beltID);
140 }
#define _log(type, fmt,...)
Definition: logsys.h:124
BeltMgr * m_beltMgr
Definition: Asteroid.h:107
const char * name()
virtual void Delete()
InventoryItemRef m_self
Definition: SystemEntity.h:269
void RemoveAsteroid(uint32 beltID, AsteroidSE *pASE)
Definition: BeltMgr.cpp:424
uint32 m_beltID
Definition: Asteroid.h:109
uint32 itemID() const
Definition: InventoryItem.h:98

Here is the call graph for this function:

void AsteroidSE::EncodeDestiny ( Buffer into)
virtual

Reimplemented from ObjectSystemEntity.

Definition at line 91 of file Asteroid.cpp.

References _log, Buffer::Append(), Destiny::BallHeader::entityID, Destiny::BallHeader::flags, Destiny::RIGID_Struct::formationID, SystemEntity::GetID(), SystemEntity::GetName(), SystemEntity::GetRadius(), main(), Destiny::BallHeader::mode, Destiny::BallHeader::posX, Destiny::BallHeader::posY, Destiny::BallHeader::posZ, Destiny::BallHeader::radius, Destiny::Ball::Mode::RIGID, SystemEntity::x(), SystemEntity::y(), and SystemEntity::z().

92 {
93  using namespace Destiny;
94 
95  BallHeader head = BallHeader();
96  head.entityID = GetID();
97  head.mode = Ball::Mode::RIGID;
98  head.radius = GetRadius();
99  head.posX = x();
100  head.posY = y();
101  head.posZ = z();
102  head.flags = 0;
103  into.Append( head );
105  main.formationID = 0xFF;
106  into.Append( main );
107 
108  _log(SE__DESTINY, "AsteroidSE::EncodeDestiny(): %s - id:%li, mode:%u, flags:0x%X", GetName(), head.entityID, head.mode, head.flags);
109 }
void Append(const T &value)
Appends a single value to buffer.
Definition: Buffer.h:437
#define _log(type, fmt,...)
Definition: logsys.h:124
double GetRadius()
Definition: SystemEntity.h:208
double y()
Definition: SystemEntity.h:214
double z()
Definition: SystemEntity.h:215
uint32 GetID()
Definition: SystemEntity.h:207
const char * GetName() const
Definition: SystemEntity.h:210
double x()
Definition: SystemEntity.h:213
int main(int argc, char *argv[])

Here is the call graph for this function:

virtual AsteroidSE* AsteroidSE::GetAsteroidSE ( )
inlinevirtual

Reimplemented from SystemEntity.

Definition at line 90 of file Asteroid.h.

90 { return this; }
void AsteroidSE::Grow ( )

Definition at line 119 of file Asteroid.cpp.

References Timer::Disable(), and m_growTimer.

Referenced by Process().

119  {
120  /* not real sure how to implement this
121  * maybe use internal data structure to hold sizes (current, possible) and time interval
122  * use this to check/update current sizes (radius and mass)
123  *
124  * currently sets quantity back to full and disables m_growTimer
125  * - not gonna work...radius is set to quantity AFTER being mined...
126  */
127 
128  //double quantity = ((25000 * log(GetRadius())) - 112404.8);
129  //m_self->SetAttribute(AttrQuantity, quantity); // quantity in m^3
130 
132 }
void Disable()
Definition: timer.h:39
Timer m_growTimer
Definition: Asteroid.h:108

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool AsteroidSE::IsAsteroidSE ( )
inlinevirtual

Reimplemented from SystemEntity.

Definition at line 92 of file Asteroid.h.

92 { return true; }
void AsteroidSE::MakeDamageState ( DoDestinyDamageState &  into)
virtual

Reimplemented from ObjectSystemEntity.

Definition at line 111 of file Asteroid.cpp.

References GetFileTimeNow().

111  {
112  into.shield = 1.0;
113  into.recharge = 30000;
114  into.timestamp = GetFileTimeNow();
115  into.armor = 1.0;
116  into.structure = 1.0;
117 }
double GetFileTimeNow()
Definition: utils_time.cpp:84

Here is the call graph for this function:

void AsteroidSE::Process ( )
virtual

Reimplemented from SystemEntity.

Definition at line 81 of file Asteroid.cpp.

References Timer::Check(), SystemManager::GetBeltMgr(), SystemBubble::GetID(), Grow(), BeltMgr::IsActive(), SystemEntity::m_bubble, m_growTimer, SystemEntity::m_system, and SystemEntity::Process().

81  {
82  /* called by EntityList::Process on every loop */
83  /* Enable base call to Process Targeting and Movement */
85 
86  if (m_growTimer.Check())
88  Grow();
89 }
virtual void Process()
Timer m_growTimer
Definition: Asteroid.h:108
SystemBubble * m_bubble
Definition: SystemEntity.h:262
bool IsActive(uint16 bubbleID)
Definition: BeltMgr.cpp:105
uint16 GetID()
Definition: SystemBubble.h:91
BeltMgr * GetBeltMgr()
SystemManager * m_system
Definition: SystemEntity.h:263
bool Check(bool reset=true)
Definition: timer.cpp:62
void Grow()
Definition: Asteroid.cpp:119

Here is the call graph for this function:

void AsteroidSE::SetMgr ( BeltMgr beltMgr,
uint32  beltID 
)
inline

Definition at line 102 of file Asteroid.h.

References m_beltID, and m_beltMgr.

Referenced by BeltMgr::Load(), and BeltMgr::SpawnAsteroid().

102 { m_beltMgr = beltMgr; m_beltID = beltID; }
BeltMgr * m_beltMgr
Definition: Asteroid.h:107
uint32 m_beltID
Definition: Asteroid.h:109

Here is the caller graph for this function:

Member Data Documentation

uint32 AsteroidSE::m_beltID
private

Definition at line 109 of file Asteroid.h.

Referenced by Delete(), and SetMgr().

BeltMgr* AsteroidSE::m_beltMgr
private

Definition at line 107 of file Asteroid.h.

Referenced by Delete(), and SetMgr().

Timer AsteroidSE::m_growTimer
private

Definition at line 108 of file Asteroid.h.

Referenced by AsteroidSE(), Grow(), and Process().


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