49 #include "packets/Planet.h"
161 _log(PLANET__INFO,
"PlanetMgrService bind request for:");
162 bind_args->
Dump(PLANET__INFO,
" ");
163 if (!bind_args->
IsInt()) {
164 _log(SERVICE__ERROR,
"%s Service: invalid bind argument type %s",
GetName(), bind_args->
TypeString());
171 if (pSysMgr ==
nullptr) {
177 _log(SERVICE__ERROR,
"%s Service: itemID is not planetID or planet not found",
GetName());
192 if (!
sConfig.cosmic.PIEnabled) {
201 if (!
sConfig.cosmic.PIEnabled) {
205 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GetPlanetInfo() size=%u", call.
tuple->
size() );
206 call.
Dump(PLANET__DUMP);
209 res->
Dump(PLANET__RES_DUMP,
" ");
215 Call_SingleIntegerArg
args;
216 if (!args.Decode(&call.
tuple)) {
217 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
225 if (!
sConfig.cosmic.PIEnabled) {
229 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_UserUpdateNetwork() size=%u", call.
tuple->
size() );
230 call.
Dump(PLANET__DUMP);
232 UUNCommandList uuncl;
233 if (!uuncl.Decode(&call.
tuple)) {
234 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
271 Call_ProgramResults
args;
272 if (!args.Decode(&call.
tuple)) {
273 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
277 return sPIDataMgr.GetProgramResultInfo(m_colony, args.ecuID, args.typeID, args.heads, args.headRadius);
308 Call_ResourceDataDict dict;
311 if (!dict.Decode(&input)) {
312 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
321 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_UserAbandonPlanet() size=%u", call.
tuple->
size() );
322 call.
Dump(PLANET__DUMP);
334 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_UserLaunchCommodities() size=%u", call.
tuple->
size() );
335 call.
Dump(PLANET__DUMP);
353 Call_LaunchCommodities
args;
354 if (!args.Decode(&call.
tuple)) {
355 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
360 std::map<uint16, uint32>
items;
362 for (; itr != dict->
end(); ++itr)
369 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_UserTransferCommodities() size=%u", call.
tuple->
size() );
370 call.
Dump(PLANET__DUMP);
391 std::map<uint16, uint32>
items;
393 for (; itr != dict->
end(); ++itr)
406 _log(PLANET__DEBUG,
"PlanetMgrService::Handle_GetPlanet() size=%u", call.
tuple->
size() );
407 call.
Dump(PLANET__DUMP);
414 _log(PLANET__DEBUG,
"PlanetMgrService::Handle_DeleteLaunch() size=%u", call.
tuple->
size() );
415 call.
Dump(PLANET__DUMP);
427 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GetCommandPinsForPlanet() size=%u", call.
tuple->
size() );
428 call.
Dump(PLANET__DUMP);
437 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GetFullNetworkForOwner() size=%u", call.
tuple->
size() );
438 call.
Dump(PLANET__DUMP);
445 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GMAddCommodity() size=%u", call.
tuple->
size() );
446 call.
Dump(PLANET__DUMP);
461 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GMConvertCommandCenter() size=%u", call.
tuple->
size() );
462 call.
Dump(PLANET__DUMP);
468 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GMForceInstallProgram() size=%u", call.
tuple->
size() );
469 call.
Dump(PLANET__DUMP);
536 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GMGetSynchedServerState() size=%u", call.
tuple->
size() );
537 call.
Dump(PLANET__DUMP);
570 _log(PLANET__DEBUG,
"PlanetMgrBound::Handle_GMRunDepletionSim() size=%u", call.
tuple->
size() );
571 call.
Dump(PLANET__DUMP);
#define sConfig
A macro for easier access to the singleton.
Dispatcher *const m_dispatch
SystemEntity * GetSE(uint32 entityID) const
void AbandonColony(Colony *pColony)
void SendErrorMsg(const char *fmt,...)
#define _log(type, fmt,...)
PyRep * GetItem(size_t index) const
Returns Python object.
Client PlanetSE * pPlanet
virtual PlanetSE * GetPlanetSE()
PyRep * GetMyLaunchesDetails(uint32 charID)
PyRep * UpdateNetwork(UUNCommandList &uuncl)
int32 GetCharacterID() const
std::string m_strBoundObjectName
Dispatcher *const m_dispatch
const char * GetName() const
PyRep * GetResourceData(Call_ResourceDataDict &dict)
virtual bool IsPlanetSE()
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
PyCallable_Make_Dispatcher(PlanetMgrBound) PlanetMgrBound(PyServiceMgr *mgr
PyRep * arguments() const
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
PyRep * GetPlanetResourceInfo()
void _SetCallDispatcher(CallDispatcher *d)
PyRep * LaunchCommodities(uint32 pinID, std::map< uint16, uint32 > &items)
virtual ~PlanetMgrBound()
#define codelog(type, fmt,...)
PyDict * TransferCommodities(uint32 srcID, uint32 destID, std::map< uint16, uint32 > items)
PyServiceMgr *const m_manager
#define PyCallable_REG_CALL(c, m)
PyCallable_DECL_CALL(GetPlanetInfo)
const_iterator begin() const
storage_type::const_iterator const_iterator
PyRep * GetPlanetInfo(Colony *pColony)
void Dump(LogType type) const
PyRep * GetPlanetsForChar(uint32 charID)
const_iterator end() const
Dispatcher *const m_dispatch
static int64 IntegerValue(PyRep *pRep)
PyCallable_Make_InnerDispatcher(PlanetMgrService) PlanetMgrService
PyRep * GetExtractorsForPlanet(int32 planetID)
virtual ~PlanetMgrService()
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all items
virtual PyBoundObject * CreateBoundObject(Client *pClient, const PyRep *bind_args)
const char * TypeString() const
const char * GetName() const