EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PlanetMgrBound.cpp
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Reve, Comet0
24  Rewrite: Allan
25 */
26 
27 //work in progress
28 
29 /*
30  * PLANET__ERROR
31  * PLANET__WARNING
32  * PLANET__MESSAGE
33  * PLANET__DEBUG
34  * PLANET__INFO
35  * PLANET__TRACE
36  * PLANET__DUMP
37  * PLANET__RES_DUMP
38  * PLANET__GC_DUMP
39  * PLANET__PKT_TRACE
40  * PLANET__DB_ERROR
41  * PLANET__DB_WARNING
42  */
43 
44 
45 #include "eve-server.h"
46 
47 #include "PyBoundObject.h"
48 #include "PyServiceCD.h"
49 #include "packets/Planet.h"
50 #include "planet/Colony.h"
51 #include "planet/Planet.h"
52 #include "planet/PlanetMgr.h"
53 #include "planet/PlanetMgrBound.h"
54 #include "system/SystemManager.h"
55 
57 : public PyBoundObject
58 {
59 public:
61 
63  : PyBoundObject(mgr),
64  m_dispatch(new Dispatcher(this)),
66  {
68 
69  m_colony = pPlanet->GetColony(pClient);
70 
71  m_colony->Init();
72 
73  m_planetMgr = new PlanetMgr(mgr, pClient, pPlanet, m_colony);
74 
75  m_strBoundObjectName = "PlanetMgrBound";
76 
77  PyCallable_REG_CALL(PlanetMgrBound, GetPlanetInfo);
78  PyCallable_REG_CALL(PlanetMgrBound, GetPlanetResourceInfo);
79  PyCallable_REG_CALL(PlanetMgrBound, GetCommandPinsForPlanet);
80  PyCallable_REG_CALL(PlanetMgrBound, GetFullNetworkForOwner);
81  PyCallable_REG_CALL(PlanetMgrBound, GetExtractorsForPlanet);
82  PyCallable_REG_CALL(PlanetMgrBound, GetProgramResultInfo);
83  PyCallable_REG_CALL(PlanetMgrBound, GetResourceData);
84  PyCallable_REG_CALL(PlanetMgrBound, UserAbandonPlanet);
85  PyCallable_REG_CALL(PlanetMgrBound, UserLaunchCommodities);
86  PyCallable_REG_CALL(PlanetMgrBound, UserTransferCommodities);
87  PyCallable_REG_CALL(PlanetMgrBound, UserUpdateNetwork);
88  /* not supported yet */
89  PyCallable_REG_CALL(PlanetMgrBound, GMAddCommodity);
90  PyCallable_REG_CALL(PlanetMgrBound, GMConvertCommandCenter);
91  PyCallable_REG_CALL(PlanetMgrBound, GMForceInstallProgram);
92  PyCallable_REG_CALL(PlanetMgrBound, GMGetLocalDistributionReport);
93  PyCallable_REG_CALL(PlanetMgrBound, GMGetSynchedServerState);
94  PyCallable_REG_CALL(PlanetMgrBound, GMRunDepletionSim);
95  }
96 
97  virtual ~PlanetMgrBound() {
98  delete m_dispatch;
100  }
101 
102  virtual void Release() {
103  delete this;
104  }
105 
106  PyCallable_DECL_CALL(GetPlanetInfo);
107  PyCallable_DECL_CALL(GetPlanetResourceInfo);
108  PyCallable_DECL_CALL(GetCommandPinsForPlanet);
109  PyCallable_DECL_CALL(GetFullNetworkForOwner);
110  PyCallable_DECL_CALL(GetExtractorsForPlanet);
111  PyCallable_DECL_CALL(GetProgramResultInfo);
112  PyCallable_DECL_CALL(GetResourceData);
113  PyCallable_DECL_CALL(UserAbandonPlanet);
114  PyCallable_DECL_CALL(UserLaunchCommodities);
115  PyCallable_DECL_CALL(UserTransferCommodities);
116  PyCallable_DECL_CALL(UserUpdateNetwork);
117  PyCallable_DECL_CALL(GMAddCommodity);
118  PyCallable_DECL_CALL(GMConvertCommandCenter);
119  PyCallable_DECL_CALL(GMForceInstallProgram);
120  PyCallable_DECL_CALL(GMGetLocalDistributionReport);
121  PyCallable_DECL_CALL(GMGetSynchedServerState);
122  PyCallable_DECL_CALL(GMRunDepletionSim);
123  /*
124 
125  data = planet.remoteHandler.GMGetCompleteResource(resourceTypeID, layer)
126  sh = builder.CreateSHFromBuffer(data.data, data.numBands)
127 
128  self.planet.remoteHandler.GMCreateNuggetLayer(self.planetID, typeID)
129  self.GMShowResource(typeID, 'nuggets') {{ 'nuggets' = layer here }}
130 
131  */
132 
133 protected:
138  Dispatcher* const m_dispatch;
139 };
140 
142 
144 : PyService(mgr, "planetMgr"), /*planetBaseBroker is for dust*/
145  m_dispatch(new Dispatcher(this))
146 {
147  _SetCallDispatcher(m_dispatch);
148 
150  PyCallable_REG_CALL(PlanetMgrService, DeleteLaunch);
151  PyCallable_REG_CALL(PlanetMgrService, GetPlanetsForChar);
152  PyCallable_REG_CALL(PlanetMgrService, GetMyLaunchesDetails);
153 }
154 
156  delete m_dispatch;
157 }
158 
160  /* sends planetID */
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());
165  return nullptr;
166  }
167 
168  StaticData sData = StaticData();
169  sDataMgr.GetStaticInfo(bind_args->AsInt()->value(), sData);
170  SystemManager* pSysMgr = sEntityList.FindOrBootSystem(sData.systemID);
171  if (pSysMgr == nullptr) {
172  pClient->SendErrorMsg("system boot failure");
173  return nullptr;
174  }
175  SystemEntity* pSE = pSysMgr->GetSE(sData.itemID);
176  if (!pSE->IsPlanetSE()) {
177  _log(SERVICE__ERROR, "%s Service: itemID is not planetID or planet not found", GetName());
178  return nullptr;
179  }
180  return new PlanetMgrBound(m_manager, pClient, pSE->GetPlanetSE());
181 }
182 
183 PyResult PlanetMgrService::Handle_GetPlanetsForChar(PyCallArgs &call) {
184  return m_db->GetPlanetsForChar(call.client->GetCharacterID());
185 }
186 
187 PyResult PlanetMgrService::Handle_GetMyLaunchesDetails(PyCallArgs &call) {
188  return m_db->GetMyLaunchesDetails(call.client->GetCharacterID());
189 }
190 
191 PyResult PlanetMgrBound::Handle_GetPlanetResourceInfo(PyCallArgs &call) {
192  if (!sConfig.cosmic.PIEnabled) {
193  call.client->SendErrorMsg("The PI system is currently disabled.");
194  return nullptr;
195  }
196 
197  return m_planet->GetPlanetResourceInfo();
198 }
199 
200 PyResult PlanetMgrBound::Handle_GetPlanetInfo(PyCallArgs &call) {
201  if (!sConfig.cosmic.PIEnabled) {
202  call.client->SendErrorMsg("The PI system is currently disabled.");
203  return nullptr;
204  }
205  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GetPlanetInfo() size=%u", call.tuple->size() );
206  call.Dump(PLANET__DUMP);
207 
208  PyRep* res = m_planet->GetPlanetInfo(m_colony);
209  res->Dump(PLANET__RES_DUMP, " ");
210 
211  return res;
212 }
213 
214 PyResult PlanetMgrBound::Handle_GetExtractorsForPlanet(PyCallArgs &call) {
215  Call_SingleIntegerArg args;
216  if (!args.Decode(&call.tuple)) {
217  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
218  return nullptr;
219  }
220 
221  return m_planet->GetExtractorsForPlanet(args.arg);
222 }
223 
224 PyResult PlanetMgrBound::Handle_UserUpdateNetwork(PyCallArgs &call) {
225  if (!sConfig.cosmic.PIEnabled) {
226  call.client->SendErrorMsg("The PI system is currently disabled.");
227  return nullptr;
228  }
229  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_UserUpdateNetwork() size=%u", call.tuple->size() );
230  call.Dump(PLANET__DUMP);
231 
232  UUNCommandList uuncl;
233  if (!uuncl.Decode(&call.tuple)) {
234  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
235  return nullptr;
236  }
237 
238  return m_planetMgr->UpdateNetwork(uuncl);
239 }
240 
241 PyResult PlanetMgrBound::Handle_GetProgramResultInfo(PyCallArgs &call) {
242  /*
243  qtyToDistribute, cycleTime, numCycles = self.remoteHandler.GetProgramResultInfo(pinID, typeID, pin.heads, headRadius)
244 
245  * 09:08:39 [PlanetDebug] PlanetMgrBound::Handle_GetProgramResultInfo() size=4
246  * 09:08:39 [PlanetCallDump] Call Arguments:
247  * 09:08:39 [PlanetCallDump] Tuple: 4 elements
248  * 09:08:39 [PlanetCallDump] [ 0] Integer field: 140006400 << ECU itemID
249  * 09:08:39 [PlanetCallDump] [ 1] Integer field: 2268 << resource typeID
250  * 09:08:39 [PlanetCallDump] [ 2] List: 3 elements << heads
251  * 09:08:39 [PlanetCallDump] [ 2] [ 0] Tuple: 3 elements
252  * 09:08:39 [PlanetCallDump] [ 2] [ 0] [ 0] Integer field: 0
253  * 09:08:39 [PlanetCallDump] [ 2] [ 0] [ 1] Real field: 0.323109
254  * 09:08:39 [PlanetCallDump] [ 2] [ 0] [ 2] Real field: 2.773487
255  * 09:08:39 [PlanetCallDump] [ 2] [ 1] Tuple: 3 elements
256  * 09:08:39 [PlanetCallDump] [ 2] [ 1] [ 0] Integer field: 1
257  * 09:08:39 [PlanetCallDump] [ 2] [ 1] [ 1] Real field: 0.344639
258  * 09:08:39 [PlanetCallDump] [ 2] [ 1] [ 2] Real field: 2.882588
259  * 09:08:39 [PlanetCallDump] [ 2] [ 2] Tuple: 3 elements
260  * 09:08:39 [PlanetCallDump] [ 2] [ 2] [ 0] Integer field: 2
261  * 09:08:39 [PlanetCallDump] [ 2] [ 2] [ 1] Real field: 0.378424
262  * 09:08:39 [PlanetCallDump] [ 2] [ 2] [ 2] Real field: 2.820603
263  * 09:11:30 [PlanetCallDump] [ 3] Real field: 0.010000 << smallest size. 0d1hr
264  * 09:12:30 [PlanetCallDump] [ 3] Real field: 0.018581 << medium size. 3d
265  * 09:13:36 [PlanetCallDump] [ 3] Real field: 0.050000 << largest size. 14d
266 
267  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GetProgramResultInfo() size=%u", call.tuple->size() );
268  call.Dump(PLANET__DUMP);
269  */
270 
271  Call_ProgramResults args;
272  if (!args.Decode(&call.tuple)) {
273  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
274  return nullptr;
275  }
276 
277  return sPIDataMgr.GetProgramResultInfo(m_colony, args.ecuID, args.typeID, args.heads, args.headRadius);
278 }
279 
280 PyResult PlanetMgrBound::Handle_GetResourceData(PyCallArgs &call) {
281  //_log(PLANET__DEBUG, "PlanetMgrBound::Handle_GetResourceData() size=%u", call.tuple->size() );
282  //call.Dump(PLANET__DUMP);
283  /*
284  inRange, sh = planet.GetResourceData(resourceTypeID) << check packets for this call --- none. :(
285 */
286  /* this is called by planet view page, by "resource filter" for given typeID
287  * this is dump before dict decoding
288  * 12:23:45 [PlanetCallDump] Dictionary: 8 entries
289  * 12:23:45 [PlanetCallDump] [ 0] Key: String: 'proximity'
290  * 12:23:45 [PlanetCallDump] [ 0] Value: Integer field: 4
291  * 12:23:45 [PlanetCallDump] [ 1] Key: String: 'updateTime'
292  * 12:23:45 [PlanetCallDump] [ 1] Value: Integer field: 0
293  * 12:23:45 [PlanetCallDump] [ 2] Key: String: 'advancedPlanetology'
294  * 12:23:45 [PlanetCallDump] [ 2] Value: Integer field: 0
295  * 12:23:45 [PlanetCallDump] [ 3] Key: String: 'remoteSensing'
296  * 12:23:45 [PlanetCallDump] [ 3] Value: Integer field: 3
297  * 12:23:45 [PlanetCallDump] [ 4] Key: String: 'newBand'
298  * 12:23:45 [PlanetCallDump] [ 4] Value: Integer field: 15
299  * 12:23:45 [PlanetCallDump] [ 5] Key: String: 'planetology'
300  * 12:23:45 [PlanetCallDump] [ 5] Value: Integer field: 0
301  * 12:23:45 [PlanetCallDump] [ 6] Key: String: 'oldBand'
302  * 12:23:45 [PlanetCallDump] [ 6] Value: Integer field: 0
303  * 12:23:45 [PlanetCallDump] [ 7] Key: String: 'resourceTypeID'
304  * 12:23:45 [PlanetCallDump] [ 7] Value: Integer field: 2268
305  */
306 
307 
308  Call_ResourceDataDict dict;
309  PyDict* input = call.tuple->AsTuple()->GetItem(0)->AsObject()->arguments()->AsDict();
310  //input->Dump(PLANET__DUMP, " ");
311  if (!dict.Decode(&input)) {
312  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
313  return nullptr;
314  }
315 
316  return m_planet->GetResourceData(dict);
317 }
318 
319 //01:52:23 [PlanetDebug] PlanetMgrBound::Handle_UserAbandonPlanet() size=0
320 PyResult PlanetMgrBound::Handle_UserAbandonPlanet(PyCallArgs &call) {
321  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_UserAbandonPlanet() size=%u", call.tuple->size() );
322  call.Dump(PLANET__DUMP);
323 
324  m_planet->AbandonColony(m_colony);
325 
326  return nullptr;
327 }
328 
329 PyResult PlanetMgrBound::Handle_UserLaunchCommodities(PyCallArgs &call) {
330  /*
331  lastLaunchTime = self.remoteHandler.UserLaunchCommodities(commandPinID, commoditiesToLaunch)
332  for typeID, qty in commoditiesToLaunch.iteritems():
333  */
334  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_UserLaunchCommodities() size=%u", call.tuple->size() );
335  call.Dump(PLANET__DUMP);
336  /* 20:00:35 L PlanetMgrBound: Handle_UserLaunchCommodities() size=2
337  * 20:00:35 [PlanetCallDump] Call Arguments:
338  * 20:00:35 [PlanetCallDump] Tuple: 2 elements
339  * 20:00:35 [PlanetCallDump] [ 0] Integer field: 140000083
340  * 20:00:35 [PlanetCallDump] [ 1] Dictionary: 1 entries
341  * 20:00:35 [PlanetCallDump] [ 1] [ 0] Key: Integer field: 2268
342  * 20:00:35 [PlanetCallDump] [ 1] [ 0] Value: Integer field: 1
343  * 20:00:35 [PlanetCallDump] Call Named Arguments:
344  * 20:00:35 [PlanetCallDump] Argument 'machoVersion':
345  * 20:00:35 [PlanetCallDump] Integer field: 1
346  *
347  *
348 21:44:05 [PlanetCallDump] Dictionary: 1 entries
349 21:44:05 [PlanetCallDump] [ 0] Key: Integer field: 3645
350 21:44:05 [PlanetCallDump] [ 0] Value: Real field: 120.000000 << no clue why this changed to float from int.
351 eve-server: /usr/local/src/eve/EVEmu/src/eve-common/python/PyRep.h:141: PyInt* PyRep::AsInt(): Assertion `IsInt()' failed.
352  */
353  Call_LaunchCommodities args;
354  if (!args.Decode(&call.tuple)) {
355  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
356  return nullptr;
357  }
358  PyDict* dict = args.dict->AsDict();
359  //dict->Dump(PLANET__DUMP, " ");
360  std::map<uint16, uint32> items;
361  PyDict::const_iterator itr = dict->begin();
362  for (; itr != dict->end(); ++itr)
363  items.insert(std::pair<uint16, uint32>(PyRep::IntegerValue(itr->first), PyRep::IntegerValue(itr->second)));
364 
365  return m_colony->LaunchCommodities(args.pinID, items);
366 }
367 
368 PyResult PlanetMgrBound::Handle_UserTransferCommodities(PyCallArgs &call) {
369  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_UserTransferCommodities() size=%u", call.tuple->size() );
370  call.Dump(PLANET__DUMP);
371 /*
372  simTime, sourceRunTime = self.remoteHandler.UserTransferCommodities(path, commodities)
373  {{ simTime = time to stop (complete time), sourceRunTime = previous runtime}}
374  15:19:15 [PlanetDebug] PlanetMgrBound::Handle_UserTransferCommodities() size=2
375  15:19:15 [PlanetCallDump] Call Arguments:
376  15:19:15 [PlanetCallDump] Tuple: 2 elements
377  15:19:15 [PlanetCallDump] [ 0] List: 5 elements
378  15:19:15 [PlanetCallDump] [ 0] [ 0] Integer field: 140007050
379  15:19:15 [PlanetCallDump] [ 0] [ 1] Integer field: 140007049
380  15:19:15 [PlanetCallDump] [ 0] [ 2] Integer field: 140006983
381  15:19:15 [PlanetCallDump] [ 0] [ 3] Integer field: 140007002
382  15:19:15 [PlanetCallDump] [ 0] [ 4] Integer field: 140006971
383  15:19:15 [PlanetCallDump] [ 1] Dictionary: 2 entries
384  15:19:15 [PlanetCallDump] [ 1] [ 0] Key: Integer field: 2390
385  15:19:15 [PlanetCallDump] [ 1] [ 0] Value: Integer field: 100
386  15:19:15 [PlanetCallDump] [ 1] [ 1] Key: Integer field: 2309
387  15:19:15 [PlanetCallDump] [ 1] [ 1] Value: Integer field: 44400
388  */
389 
390  PyDict* dict = call.tuple->GetItem(1)->AsDict();
391  std::map<uint16, uint32> items;
392  PyDict::const_iterator itr = dict->begin();
393  for (; itr != dict->end(); ++itr)
394  items.insert(std::pair<uint16, uint32>(PyRep::IntegerValue(itr->first), PyRep::IntegerValue(itr->second)));
395 
396  PyList* list = call.tuple->GetItem(0)->AsList();
397  return m_colony->TransferCommodities(PyRep::IntegerValue(list->items.front()), PyRep::IntegerValue(list->items.back()), items);
398 }
399 
400 
405 PyResult PlanetMgrService::Handle_GetPlanet(PyCallArgs &call) {
406  _log(PLANET__DEBUG, "PlanetMgrService::Handle_GetPlanet() size=%u", call.tuple->size() );
407  call.Dump(PLANET__DUMP);
408 
409  return nullptr;
410 }
411 
412 PyResult PlanetMgrService::Handle_DeleteLaunch(PyCallArgs &call) {
413  //sm.RemoteSvc('planetMgr').DeleteLaunch
414  _log(PLANET__DEBUG, "PlanetMgrService::Handle_DeleteLaunch() size=%u", call.tuple->size() );
415  call.Dump(PLANET__DUMP);
416 
417  return nullptr;
418 }
419 
420 PyResult PlanetMgrBound::Handle_GetCommandPinsForPlanet(PyCallArgs &call) {
421  /* called by "get other character's networks" in planet menu
422  * 16:42:42 [PlanetDebug] PlanetMgrBound::Handle_GetCommandPinsForPlanet() size=1
423  * 16:42:42 [PlanetCallDump] Call Arguments:
424  * 16:42:42 [PlanetCallDump] Tuple: 1 elements
425  * 16:42:42 [PlanetCallDump] [ 0] Integer field: 40159411
426  */
427  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GetCommandPinsForPlanet() size=%u", call.tuple->size() );
428  call.Dump(PLANET__DUMP);
429 
430  // returns empty dict if none
431  return new PyDict();
432 }
433 
434 PyResult PlanetMgrBound::Handle_GetFullNetworkForOwner(PyCallArgs &call) {
435  /*
436  */
437  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GetFullNetworkForOwner() size=%u", call.tuple->size() );
438  call.Dump(PLANET__DUMP);
439 
440  // returns empty dict if none
441  return new PyDict();
442 }
443 
444 PyResult PlanetMgrBound::Handle_GMAddCommodity(PyCallArgs &call) {
445  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMAddCommodity() size=%u", call.tuple->size() );
446  call.Dump(PLANET__DUMP);
447 
448  return nullptr;
449 }
450 
451 PyResult PlanetMgrBound::Handle_GMConvertCommandCenter(PyCallArgs &call) {
452  //self.remoteHandler.GMConvertCommandCenter(pinID)
453  // this is an option in the GM planet menu. no clue what it's for or what it does.....
454  /*
455  * 02:48:32 [PlanetDebug] PlanetMgrBound::Handle_GMConvertCommandCenter() size=1
456  * 02:48:32 [PlanetCallDump] Call Arguments:
457  * 02:48:32 [PlanetCallDump] Tuple: 1 elements
458  * 02:48:32 [PlanetCallDump] [ 0] Integer field: 140006224 << CC PinID (currently wrong)
459  */
460 
461  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMConvertCommandCenter() size=%u", call.tuple->size() );
462  call.Dump(PLANET__DUMP);
463 
464  return nullptr;
465 }
466 
467 PyResult PlanetMgrBound::Handle_GMForceInstallProgram(PyCallArgs &call) {
468  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMForceInstallProgram() size=%u", call.tuple->size() );
469  call.Dump(PLANET__DUMP);
470  /*
471  * if typeID not in resourceInfo or qtyPerCycle < 0 or cycleTime < 10 * SEC or lifetimeHours < 1 or headRadius <= 0.0:
472  * return
473  * self.remoteHandler.GMForceInstallProgram(pinID, typeID, cycleTime, lifetimeHours, qtyPerCycle, headRadius)
474  *
475  * 16:40:57 L PlanetMgrBound: Handle_GMForceInstallProgram() size=6
476  * 16:40:57 [PlanetCallDump] Call Arguments:
477  * 16:40:57 [PlanetCallDump] Tuple: 6 elements
478  * 16:40:57 [PlanetCallDump] [ 0] Tuple: 2 elements
479  * 16:40:57 [PlanetCallDump] [ 0] [ 0] Integer field: 1
480  * 16:40:57 [PlanetCallDump] [ 0] [ 1] Integer field: 1
481  * 16:40:57 [PlanetCallDump] [ 1] Integer field: 2272
482  * 16:40:57 [PlanetCallDump] [ 2] Integer field: 600000000
483  * 16:40:57 [PlanetCallDump] [ 3] Integer field: 24
484  * 16:40:57 [PlanetCallDump] [ 4] Integer field: 100
485  * 16:40:57 [PlanetCallDump] [ 5] Real field: 1.000000
486  */
487  return nullptr;
488 }
489 
490 //15:15:02 L PlanetMgrBound: Handle_GMGetLocalDistributionReport() size=2
491 PyResult PlanetMgrBound::Handle_GMGetLocalDistributionReport(PyCallArgs &call) {
492  /*
493  * return self.remoteHandler.GMGetLocalDistributionReport(self.planetID, (surfacePoint.theta, surfacePoint.phi))
494  */
495  /*
496  * 15:15:02 [PlanetCallDump] Call Arguments:
497  * 15:15:02 [PlanetCallDump] Tuple: 2 elements
498  * 15:15:02 [PlanetCallDump] [ 0] Integer field: 40216265 << planetID
499  * 15:15:02 [PlanetCallDump] [ 1] Tuple: 2 elements
500  * 15:15:02 [PlanetCallDump] [ 1] [ 0] Real field: 0.359286 << theta
501  * 15:15:02 [PlanetCallDump] [ 1] [ 1] Real field: 1.014020 << phi
502  * _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMGetLocalDistributionReport() size=%u", call.tuple->size() );
503  * call.Dump(PLANET__DUMP);
504  */
505 
506  return nullptr;
507 }
508 
509 PyResult PlanetMgrBound::Handle_GMGetSynchedServerState(PyCallArgs &call) {
510  /*
511  * def GMVerifySimulation(self):
512  * self.LogNotice('VerifySimulation -- starting')
513  * simulationDuration, remoteColonyData = self.remoteHandler.GMGetSynchedServerState(session.charid)
514  * simEndTime = remoteColonyData.currentSimTime
515  * colony = self.GetColony(session.charid)
516  * startTime = blue.os.GetWallclockTimeNow()
517  * colony.RunSimulation(runSimUntil=simEndTime)
518  * clientSimulationRuntime = blue.os.GetWallclockTimeNow() - startTime
519  * pins = remoteColonyData.pins
520  * self.LogNotice('simulation ran for', clientSimulationRuntime, 'on client, ', simulationDuration, 'on server')
521  * for pin in pins:
522  * clientPin = colony.GetPin(pin.id)
523  * if clientPin is None:
524  * self.LogError(pin.id, 'exists on server but not on client')
525  * continue
526  * for key, value in pin.__dict__.iteritems():
527  * if not hasattr(clientPin, key):
528  * self.LogError(pin.id, 'on client does not have attribute ', key)
529  * continue
530  * clientValue = getattr(clientPin, key)
531  * if clientValue != value:
532  * self.LogError(pin.id, 'does not agree on a value for', key, 'Client says ', clientValue, 'but server', value)
533  *
534  * self.LogNotice('VerifySimulation -- finished')
535  */
536  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMGetSynchedServerState() size=%u", call.tuple->size() );
537  call.Dump(PLANET__DUMP);
538 
539  return nullptr;
540 }
541 
542 PyResult PlanetMgrBound::Handle_GMRunDepletionSim(PyCallArgs &call) {
543  /*
544  * 18:37:58 [ClientCallRep] GMRunDepletionSim call made to
545  * 18:37:58 [PlanetDebug] PlanetMgrBound::Handle_GMRunDepletionSim() size=2
546  * 18:37:58 [PlanetCallDump] Call Arguments:
547  * 18:37:58 [PlanetCallDump] Tuple: 2 elements
548  * 18:37:58 [PlanetCallDump] [ 0] (None)
549  * 18:37:58 [PlanetCallDump] [ 1] Object:
550  * 18:37:58 [PlanetCallDump] [ 1] Type: String: 'util.KeyVal'
551  * 18:37:58 [PlanetCallDump] [ 1] Args: Dictionary: 2 entries
552  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 0] Key: String: 'totalDuration'
553  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 0] Value: Integer field: 12096000000000
554  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Key: String: 'points'
555  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: List: 1 elements
556  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Object:
557  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Type: String: 'util.KeyVal'
558  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: Dictionary: 5 entries
559  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 0] Key: String: 'duration'
560  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 0] Value: Integer field: 1440
561  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 1] Key: String: 'amount'
562  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 1] Value: Integer field: 500
563  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 2] Key: String: 'longitude'
564  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 2] Value: Real field: 2.646786
565  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 3] Key: String: 'headRadius'
566  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 3] Value: Real field: 0.050000
567  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 4] Key: String: 'latitude'
568  * 18:37:58 [PlanetCallDump] [ 1] Args: [ 1] Value: [ 0] Args: [ 4] Value: Real field: 1.104679
569  */
570  _log(PLANET__DEBUG, "PlanetMgrBound::Handle_GMRunDepletionSim() size=%u", call.tuple->size() );
571  call.Dump(PLANET__DUMP);
572 
573  return nullptr;
574 }
Base Python wire object.
Definition: PyRep.h:66
#define sConfig
A macro for easier access to the singleton.
PyTuple * AsTuple()
Definition: PyRep.h:138
Dispatcher *const m_dispatch
SystemEntity * GetSE(uint32 entityID) const
void AbandonColony(Colony *pColony)
Definition: Planet.cpp:266
void SendErrorMsg(const char *fmt,...)
Definition: Client.cpp:2719
#define _log(type, fmt,...)
Definition: logsys.h:124
PyRep * GetItem(size_t index) const
Returns Python object.
Definition: PyRep.h:602
int32 value() const
Definition: PyRep.h:247
Client PlanetSE * pPlanet
Python's dictionary.
Definition: PyRep.h:719
size_t size() const
Definition: PyRep.h:591
virtual PlanetSE * GetPlanetSE()
Definition: SystemEntity.h:101
PyRep * GetMyLaunchesDetails(uint32 charID)
Definition: PlanetDB.cpp:111
#define sPIDataMgr
Definition: PlanetDataMgr.h:79
PyRep * UpdateNetwork(UUNCommandList &uuncl)
Definition: PlanetMgr.cpp:37
int32 GetCharacterID() const
Definition: Client.h:113
#define sEntityList
Definition: EntityList.h:208
PlanetSE * m_planet
PyObject * AsObject()
Definition: PyRep.h:152
std::string m_strBoundObjectName
Definition: PyBoundObject.h:54
Dispatcher *const m_dispatch
const char * GetName() const
Definition: PyService.h:54
PyRep * GetResourceData(Call_ResourceDataDict &dict)
Definition: Planet.cpp:136
virtual bool IsPlanetSE()
Definition: SystemEntity.h:149
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
Definition: PyRep.cpp:84
PyCallable_Make_Dispatcher(PlanetMgrBound) PlanetMgrBound(PyServiceMgr *mgr
PyRep * arguments() const
Definition: PyRep.h:845
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
PyRep * GetPlanetResourceInfo()
Definition: Planet.cpp:196
void _SetCallDispatcher(CallDispatcher *d)
Definition: PyCallable.h:87
Definition: Colony.h:38
* args
PyRep * LaunchCommodities(uint32 pinID, std::map< uint16, uint32 > &items)
Definition: Colony.cpp:927
virtual ~PlanetMgrBound()
#define codelog(type, fmt,...)
Definition: logsys.h:128
void Init()
Definition: Colony.cpp:142
storage_type items
Definition: PyRep.h:708
PyList * AsList()
Definition: PyRep.h:140
PyDict * AsDict()
Definition: PyRep.h:142
PyDict * TransferCommodities(uint32 srcID, uint32 destID, std::map< uint16, uint32 > items)
Definition: Colony.cpp:864
PyServiceMgr *const m_manager
Definition: PyService.h:91
PlanetMgr * m_planetMgr
Client *const client
Definition: PyCallable.h:49
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
Definition: Client.h:66
PyCallable_DECL_CALL(GetPlanetInfo)
const_iterator begin() const
Definition: PyRep.h:766
storage_type::const_iterator const_iterator
Definition: PyRep.h:750
PyRep * GetPlanetInfo(Colony *pColony)
Definition: Planet.cpp:209
uint32 systemID
void Dump(LogType type) const
Definition: PyCallable.cpp:81
PyRep * GetPlanetsForChar(uint32 charID)
Definition: PlanetDB.cpp:75
const_iterator end() const
Definition: PyRep.h:767
bool IsInt() const
Definition: PyRep.h:100
Dispatcher *const m_dispatch
static int64 IntegerValue(PyRep *pRep)
Definition: PyRep.cpp:118
PyRep * GetColony()
Definition: Colony.cpp:1313
PyInt * AsInt()
Definition: PyRep.h:122
PyCallable_Make_InnerDispatcher(PlanetMgrService) PlanetMgrService
PyRep * GetExtractorsForPlanet(int32 planetID)
Definition: Planet.cpp:230
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
Definition: PyRep.cpp:76
virtual void Release()
Python list.
Definition: PyRep.h:639
const char * GetName() const
Definition: PyBoundObject.h:44
PyTuple * tuple
Definition: PyCallable.h:50
#define sDataMgr