33 #include "packets/Planet.h"
55 cur.second->Shutdown();
67 std::vector<uint16> typeIDs;
81 int min = round(sysSec *10);
89 for (
uint16 i=0; i<3600; ++i)
91 for (
uint16 i=0; i<3600; ++i)
93 for (
uint16 i=0; i<3600; ++i)
95 for (
uint16 i=0; i<3600; ++i)
97 for (
uint16 i=0; i<3600; ++i)
133 cur.second->Process();
176 std::map<uint16, std::string>::iterator itr =
m_typeBuffers.find(dict.resourceTypeID);
180 std::string data = itr->second.substr(0, size);
182 _log(PLANET__DEBUG,
"PlanetSE::GetResourceData() for %s (%u) using remoteSense: %u, planetology: %u, advPlanetology: %u - updateTime: %u, proximity: %u, newBand: %u, oldBand: %u, bufferSize: %u", \
183 sPIDataMgr.GetProductName(dict.resourceTypeID), dict.resourceTypeID, dict.remoteSensing, dict.planetology, dict.advancedPlanetology, \
184 dict.updateTime, dict.proximity, dict.newBand, dict.oldBand, size);
186 args->SetItemString(
"data",
new PyString(data));
187 args->SetItemString(
"numBands",
new PyInt(dict.newBand));
188 args->SetItemString(
"proximity",
new PyInt(dict.proximity));
192 rtn->
Dump(PLANET__RES_DUMP,
" ");
205 res->
Dump(PLANET__RES_DUMP,
" ");
226 rtn->
Dump(PLANET__RES_DUMP,
" ");
251 list->
Dump(PLANET__RES_DUMP,
" ");
326 pos.
x += radius + 700000 * std::sin(rad);
327 pos.
z += radius + 700000 * std::cos(rad);
332 iRef->SetPosition(pos);
333 iRef->ChangeSingleton(
true,
false);
PlanetSE(InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
PlanetResourceData m_data
void AddEntity(SystemEntity *pSE, bool addSignal=true)
void AbandonColony(Colony *pColony)
#define _log(type, fmt,...)
float GetFloat(uint32 index) const
int32 GetInt(uint32 index) const
double min(double x, double y)
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
Python floating point number.
int32 GetCharacterID() const
PyServiceMgr & m_services
const float GetSystemSecurityRating()
PyRep * GetResourceData(Call_ResourceDataDict &dict)
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
const GPoint & GetPosition() const
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
PyRep * GetPlanetResourceInfo()
bool GetRow(DBResultRow &into)
#define is_log_enabled(type)
virtual bool LoadExtras()
double Deg2Rad(double deg)
static const char hexList[]
void CreateCustomsOffice()
Colony * GetColony(Client *pClient)
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
PyRep * GetPlanetInfo(Colony *pColony)
std::map< uint16, std::string > m_typeBuffers
virtual bool LoadExtras()
static void GetExtractorsForPlanet(uint32 planetID, DBQueryResult &res)
PyRep * GetExtractorsForPlanet(int32 planetID)
void SetItem(PyRep *key, PyRep *value)
SetItem adds or sets a database entry.
const char * itoa(int64 num)
Convers num to string.
std::map< uint32, Colony * > m_colonies