EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PlanetDataMgr.cpp
Go to the documentation of this file.
1 
10  /*
11  * PLANET__ERROR
12  * PLANET__WARNING
13  * PLANET__MESSAGE
14  * PLANET__DEBUG
15  * PLANET__INFO
16  * PLANET__TRACE
17  * PLANET__DUMP
18  * PLANET__RES_DUMP
19  * PLANET__GC_DUMP
20  * PLANET__PKT_TRACE
21  * PLANET__DB_ERROR
22  * PLANET__DB_WARNING
23  */
24 
25 #include "eve-server.h"
26 
27 #include "inventory/ItemFactory.h"
29 #include "planet/PlanetDataMgr.h"
30 #include "planet/Colony.h"
31 
33 {
34 }
35 
37 {
38  _Populate();
39  sLog.Blue(" PlanetDataMgr", "Planet Data Manager Initialized.");
40  return 1;
41 }
42 
44 {
45  double start = GetTimeMSeconds();
46  DBQueryResult* res = new DBQueryResult();
47  DBResultRow row;
48 
49  m_db.GetPlanetData(*res);
50  while (res->GetRow(row)) {
51  // SELECT planet.typeID, resource.typeID
52  m_planetData.insert(std::pair<uint32, uint32>(row.GetInt(0), row.GetInt(1)));
53  }
54 
55  //cleanup
56  SafeDelete(res);
57  sLog.Cyan(" PlanetDataMgr", "%u planet data groups in %u buckets loaded in %.3fms.",\
58  m_planetData.size(), m_planetData.bucket_count(), (GetTimeMSeconds() - start));
59 }
60 
61 void PlanetDataMgr::GetPlanetData(uint32 planetID, std::vector<uint16> &typeIDs)
62 {
63  auto itr = m_planetData.equal_range(planetID);
64  for (auto it = itr.first; it != itr.second; ++it)
65  typeIDs.push_back(it->second);
66 }
67 
68 const char* PlanetDataMgr::GetCommandName(int8 commandID)
69 {
70  using namespace PI::Command;
71  switch (commandID) {
72  case Invalid: return "Invalid";
73  case CreatePin: return "CreatePin";
74  case RemovePin: return "RemovePin";
75  case CreateLink: return "CreateLink";
76  case RemoveLink: return "RemoveLink";
77  case CreateRoute: return "CreateRoute";
78  case SetLinkLevel: return "SetLinkLevel";
79  case UpgradeCommandCenter: return "UpgradeCommandCenter";
80  case SetSchematic: return "SetSchematic";
81  case RemoveRoute: return "RemoveRoute";
82  case AddExtractorHead: return "AddExtractorHead";
83  case MoveExtractorHead: return "MoveExtractorHead";
84  case InstallProgram: return "InstallProgram";
85  case KillExtractorHead: return "KillExtractorHead";
86  case PrioritizeRoute: return "PrioritizeRoute";
87  default: return "UnknownCommandID";
88  }
89 }
90 
91 
93 {
94 }
95 
97 {
98  _Populate();
99  sLog.Blue(" PIDataMgr", "Planet Interaction Data Manager Initialized.");
100  return 1;
101 }
102 
103 // do we need anything from piPinMap? - maps SchematicID to manuf facility's typeID
105 {
106  double start = GetTimeMSeconds();
107  DBQueryResult* res = new DBQueryResult();
108 
109  m_db.GetSchematicData(*res);
110  DBResultRow row;
111  std::map<uint8, PI_Schematic>::iterator itr;
112  while (res->GetRow(row)) {
113  // SELECT `schematicID`, `typeID`, `quantity`, `isInput`
114  itr = m_schematicData.find(row.GetInt(0));
115  if (itr != m_schematicData.end()) {
116  if (row.GetBool(3)) {
117  itr->second.inputs[row.GetInt(1)] = row.GetInt(2);
118  } else {
119  itr->second.outputType = row.GetInt(1);
120  itr->second.outputQty = row.GetInt(2);
121  }
122  } else {
123  PI_Schematic data = PI_Schematic();
124  if (row.GetBool(3)) {
125  data.inputs[row.GetInt(1)] = row.GetInt(2);
126  } else {
127  data.outputType = row.GetInt(1);
128  data.outputQty = row.GetInt(2);
129  }
130  m_schematicData[row.GetInt(0)] = data;
131  }
132  }
133 
134  m_db.GetSchematicTimes(*res);
135  while (res->GetRow(row)) {
136  // SELECT `schematicID`, `cycleTime`
137  itr = m_schematicData.find(row.GetInt(0));
138  if (itr != m_schematicData.end())
139  itr->second.cycleTime = row.GetInt(1);
140  }
141 
142  //cleanup
143  SafeDelete(res);
144  sLog.Cyan(" PIDataMgr", "%u PI Schematic data groups loaded in %.3fms.", m_schematicData.size(), (GetTimeMSeconds() - start));
145 }
146 
148 {
149  std::map<uint8, PI_Schematic>::iterator itr = m_schematicData.find(schematicID);
150  if (itr != m_schematicData.end()) {
151  data = itr->second;
152  return;
153  }
154  _log(PLANET__ERROR, "PIDataMgr::GetSchematicData() - Data not found for schematic %u", schematicID);
155 }
156 
157 /* these are for PI */
158 /*
159  * AttrHarvesterType = 709,
160  * AttrHarvesterQuality = 710,
161  * AttrLogisticalCapacity = 1631,
162  * AttrPlanetRestriction = 1632,
163  * AttrPowerLoadPerKm = 1633,
164  * AttrCPULoadPerKm = 1634,
165  * AttrCPULoadLevelModifier = 1635,
166  * AttrPowerLoadLevelModifier = 1636,
167  * AttrImportTax = 1638,
168  * AttrExportTax = 1639,
169  * AttrImportTaxMultiplier = 1640,
170  * AttrExportTaxMultiplier = 1641,
171  * AttrPinExtractionQuantity = 1642,
172  * AttrPinCycleTime = 1643,
173  * AttrExtractorDepletionRange = 1644,
174  * AttrExtractorDepletionRate = 1645,
175  * AttrCommandCenterHoldCapacity = 1646,
176  * AttrECUDecayFactor = 1683, // this attr is empty
177  * AttrECUMaxVolume = 1684,
178  * AttrECUOverlapFactor = 1685,
179  * AttrECUNoiseFactor = 1687, // this attr is empty
180  * AttrECUAreaOfInfluence = 1689,
181  * AttrECUExtractorHeadCPU = 1690,
182  * AttrECUExtractorHeadPower = 1691,
183  *
184  * decayFactor = 0.012
185  * noiseFactor = 0.8
186  * baseValue = 1998.0
187  */
188 
189 PyRep* PIDataMgr::GetProgramResultInfo(Colony* pColony, uint32 pinID, uint16 typeID, PyList* heads, float headRadius)
190 {
191  // ECU pinID, resource typeID, list of {headID, lat, long}, radius of head (small number...rad maybe?)
192  // qtyToDistribute, cycleTime, numCycles = self.remoteHandler.GetProgramResultInfo(pinID, typeID, pin.heads, headRadius)
193 
196  /*
197  * SEC = 10000000L
198  * MIN = SEC * 60L
199  * HOUR = MIN * 60L
200  * RADIUS_DRILLAREAMAX = 0.05
201  * RADIUS_DRILLAREAMIN = 0.01
202  * RADIUS_DRILLAREADIFF = RADIUS_DRILLAREAMAX - RADIUS_DRILLAREAMIN
203  *
204  * def GetProgramLengthFromHeadRadius(headRadius):
205  * return ((headRadius - RADIUS_DRILLAREAMIN) / RADIUS_DRILLAREADIFF) * 335 + 1 << length in hours between 1 and 336 (336h = 14d)
206  * def GetCycleTimeFromProgramLength(programLength):
207  * return 0.25 * 2 ^ max(0, math.floor(math.log(programLength / 25.0, 2)) + 1)
208  *
209  * programLength = planetCommon.GetProgramLengthFromHeadRadius(headRadius)
210  * cycleTime = planetCommon.GetCycleTimeFromProgramLength(programLength)
211  * numCycles = int(programLength / cycleTime)
212  * cycleTime = int(cycleTime * HOUR)
213  */
214  InventoryItemRef iRef = sItemFactory.GetItem(pinID);
215  float cycleTime = iRef->GetAttribute(AttrPinCycleTime).get_int()/*300*/, length = 0;
216  uint16 numCycles = 0;
217  double one = ((headRadius - 0.01f) /0.04);
218  length = one * 335 + 1; //293
219  double two = log2(length /25); //3.584962501
220  cycleTime = EvE::max(floor(two) + 1); //4
221  cycleTime = 0.25 * (pow(2, cycleTime)); // this is (float) in hours (0.25, 0.5, etc)
222  numCycles = (uint16)(length / cycleTime); //73
223  int64 iCycleTime = cycleTime * EvE::Time::Hour;
224 
225  uint32 qtyPerCycle = GetProgramOutput(iRef, iCycleTime);
226  //qtyPerCycle *= heads->size();
227 
228  _log(PLANET__TRACE, "PlanetMgr::GetProgramResultInfo() - cycleTime:%.2f, iCycleTime:%li, length:%.2f, numCycles:%u, qtyPerCycle:%u, heads: %u, headRadius:%.4f", \
229  cycleTime, iCycleTime, length, numCycles, qtyPerCycle, heads->size(), headRadius);
230 
231  PyTuple* res = new PyTuple(3);
232  res->SetItem(0, new PyInt(qtyPerCycle)); //qtyToDistribute (2843)
233  res->SetItem(1, new PyLong(iCycleTime)); //cycleTime - in usec (9000000000)
234  res->SetItem(2, new PyInt(numCycles)); //numCycles (12)
235 
236  if (is_log_enabled(PLANET__RES_DUMP))
237  res->Dump(PLANET__RES_DUMP, " ");
238 
239  pColony->SetProgramResults(pinID, typeID, numCycles, headRadius, cycleTime, qtyPerCycle);
240 
241  /* based on values noted in GetProgramOutput()
242  13:17:37 [PlanetTrace] PlanetMgr::GetProgramResultInfo() - cycleTime:0.25, iCycleTime:1251639296, length:8.28, numCycles:33, qtyPerCycle:1380 (one:0.02172, two:-1.59504) headRadius:0.0109
243  13:17:37 [PlanetResDump] Tuple: 3 elements
244  13:17:37 [PlanetResDump] [ 0] Integer: 1380
245  13:17:37 [PlanetResDump] [ 1] Long: 1251639296
246  13:17:37 [PlanetResDump] [ 2] Integer: 33
247  */
248  PySafeDecRef(heads);
249  return res;
250 }
251 
252 /* heads.append((headID, latitude, longitude))
253  headID, phi, theta = head
254  if surfacePoint: <<-- this is mousePoint
255  theta = 2.0 * math.pi - surfacePoint.theta
256  phi = surfacePoint.phi
257  else:
258  theta = 2.0 * math.pi - theta
259  phi = phi
260  return max(0.0, builder.GetValueAt(self.sh, theta, phi))
261  */
262 // ecu program methods from client
263 
265 {
266  // this is in client to display the Extractor window program results.
267 
268  if (startTime == 0)
269  startTime = GetFileTimeNow() - 2 * EvE::Time::Second;
270  if (currentTime == 0)
271  currentTime = GetFileTimeNow();
272 
273  int cycleNum = EvE::max((currentTime - startTime + EvE::Time::Second) / cycleTime - 1, 1);
274  float barWidth = cycleTime / EvE::Time::Second / 900.0; //0.13888
275  float t = (cycleNum + 0.5f) * barWidth; // 0.20833
276  // qtyPerCycle default is 1000. it is reset to calculated after this returns
277  /*
278  uint32 qtyPerCycle = iRef->GetDefaultAttribute(AttrPinExtractionQuantity).get_uint32();
279  float decayValue = qtyPerCycle / (1 + t * iRef->GetAttribute(AttrECUDecayFactor).get_float()); // 1000
280  float f1 = 1.0f / 12; // 0.08333
281  float f2 = 1.0f / 5; // 0.2
282  float f3 = 1.0f / 2; // 0.5
283  float phaseShift = pow(qtyPerCycle, 0.7); // 125.89254
284  float sinA = cos(phaseShift + t * f1); // 0.96985
285  float sinB = cos(phaseShift / 2 + t * f2); // 0.98784
286  float sinC = cos(t * f3); // 0.99457
287  float sinStuff = (sinA + sinB + sinC) / 3; // 0.98408
288  sinStuff = EvE::max(sinStuff);
289  float barHeight = decayValue * (1 + iRef->GetAttribute(AttrECUNoiseFactor).get_float() * sinStuff); //0.8
290  */
291  return uint32(barWidth * 1000); // 0.13888 * 1000 16
292 }
293 
295 {
296  uint32 val = 0;
297  if (numCycles > 120) // hardcoded in client
298  numCycles = 120;
299  for (int i=1; i <= numCycles; ++i)
300  val += GetProgramOutput(iRef, cycleTime, i * cycleTime);
301  return val;
302 }
303 
304 uint32 PIDataMgr::GetMaxOutput(InventoryItemRef iRef, uint32 qtyPerCycle/*0*/, int64 cycleTime/*0*/)
305 {
306  if (qtyPerCycle == 0)
307  qtyPerCycle = iRef->GetAttribute(AttrPinExtractionQuantity).get_uint32();
308  if (cycleTime == 0)
309  cycleTime = iRef->GetAttribute(AttrPinCycleTime).get_int() * EvE::Time::Second; // base time is 300s
310  float scalar = iRef->GetAttribute(AttrECUNoiseFactor).get_float() +1;
311  return (scalar * qtyPerCycle) * cycleTime / EvE::Time::Second / 900.0;
312 }
313 
315 {
316  switch (ecuTypeID) {
317  case 2848: { //Barren ECU
318  switch (programType) {
319  case 2268: return 2409; //Barren Aqueous Liquid Extractor
320  case 2267: return 2430; //Barren Base Metals Extractor
321  case 2270: return 2435; //Barren Noble Metals Extractor
322  case 2073: return 2449; //Barren Microorganisms Extractor
323  case 2288: return 2459; //Barren Carbon Compounds Extractor
324  }
325  } break;
326  case 3060: { //Gas ECU
327  switch (programType) {
328  case 2268: return 2416; //Gas Aqueous Liquid Extractor
329  case 2309: return 2424; //Gas Ionic Solutions Extractor
330  case 2310: return 2426; //Gas Noble Gas Extractor
331  case 2311: return 2427; //Gas Reactive Gas Extractor
332  case 2267: return 2433; //Gas Base Metals Extractor
333  }
334  } break;
335  case 3061: { //Ice ECU
336  switch (programType) {
337  case 2268: return 2415; //Ice Aqueous Liquid Extractor
338  case 2310: return 2423; //Ice Noble Gas Extractor
339  case 2073: return 2432; //Ice Microorganisms Extractor
340  case 2286: return 2438; //Ice Planktic Colonies Extractor
341  case 2272: return 2441; //Ice Heavy Metals Extractor
342  }
343  } break;
344  case 3062: { //Lava ECU
345  switch (programType) {
346  case 2308: return 2418; //Lava Suspended Plasma Extractor
347  case 2267: return 2428; //Lava Base Metals Extractor
348  case 2272: return 2439; //Lava Heavy Metals Extractor
349  case 2306: return 2442; //Lava Non-CS Crystals Extractor
350  case 2307: return 2448; //Lava Felsic Magma Extractor
351  }
352  } break;
353  case 3063: { //Oceanic ECU
354  switch (programType) {
355  case 2268: return 2414; //Oceanic Aqueous Liquid Extractor
356  case 2287: return 2458; //Oceanic Complex Organisms Extractor
357  case 2286: return 2452; //Oceanic Planktic Colonies Extractor
358  case 2288: return 2461; //Oceanic Carbon Compounds Extractor
359  case 2073: return 2451; //Oceanic Microorganisms Extractor
360  }
361  } break;
362  case 3064: { //Plasma ECU
363  switch (programType) {
364  case 2308: return 2417; //Plasma Suspended Plasma Extractor
365  case 2267: return 2429; //Plasma Base Metals Extractor
366  case 2270: return 2434; //Plasma Noble Metals Extractor
367  case 2272: return 2440; //Plasma Heavy Metals Extractor
368  case 2306: return 2443; //Plasma Non-CS Crystals Extractor
369  }
370  } break;
371  case 3067: { //Storm ECU
372  switch (programType) {
373  case 2268: return 2413; //Storm Aqueous Liquid Extractor
374  case 2308: return 2419; //Storm Suspended Plasma Extractor
375  case 2309: return 2422; //Storm Ionic Solutions Extractor
376  case 2310: return 2425; //Storm Noble Gas Extractor
377  case 2267: return 2431; //Storm Base Metals Extractor
378  }
379  } break;
380  case 3068: { //Temperate ECU
381  switch (programType) {
382  case 2268: return 2412; //Temperate Aqueous Liquid Extractor
383  case 2073: return 2450; //Temperate Microorganisms Extractor
384  case 2287: return 2453; //Temperate Complex Organisms Extractor
385  case 2288: return 2460; //Temperate Carbon Compounds Extractor
386  case 2305: return 2462; //Temperate Autotrophs Extractor
387  }
388  } break;
389  }
390  _log(PLANET__ERROR, "PIDataMgr::GetHeadType() - Extractor typeID not found using ECU typeID: %u and Resource typeID: %u", ecuTypeID, programType);
391  return 2412; //Temperate Aqueous Liquid Extractor <<< as good a default as any...
392 }
393 
395 {
396  switch (typeID) {
397  // P0 - Raw Materials
398  case 2267: //Base Metals
399  case 2270: //Noble Metals
400  case 2272: //Heavy Metals
401  case 2306: //Non-CS Crystals
402  case 2307: //Felsic Magma
403  case 2268: //Aqueous Liquids
404  case 2308: //Suspended Plasma
405  case 2309: //Ionic Solutions
406  case 2310: //Noble Gas
407  case 2311: //Reactive Gas
408  case 2073: //Microorganisms
409  case 2286: //Planktic Colonies
410  case 2287: //Complex Organisms
411  case 2288: //Carbon Compounds
412  case 2305: //Autotrophs
413  return 0;
414 
415  // P1 - Basic Commodities
416  case 2389: //Plasmoids
417  case 2390: //Electrolytes
418  case 2392: //Oxidizing Compound
419  case 2393: //Bacteria
420  case 2395: //Proteins
421  case 2396: //Biofuels
422  case 2397: //Industrial Fibers
423  case 2398: //Reactive Metals
424  case 2399: //Precious Metals
425  case 2400: //Toxic Metals
426  case 2401: //Chiral Structures
427  case 3779: //Biomass
428  case 9828: //Silicon
429  case 3683: //Oxygen
430  case 3645: //Water
431  return 1;
432 
433  // P2 - Refined Commodities
434  case 44: //Enriched Uranium
435  case 2312: //Supertensile Plastics
436  case 2317: //Oxides
437  case 2319: //Test Cultures
438  case 2321: //Polyaramids
439  case 2327: //Microfiber Shielding
440  case 2328: //Water-Cooled CPU
441  case 2329: //Biocells
442  case 2463: //Nanites
443  case 3689: //Mechanical Parts
444  case 3691: //Synthetic Oil
445  case 3693: //Fertilizer
446  case 3695: //Polytextiles
447  case 3697: //Silicate Glass
448  case 3725: //Livestock
449  case 3775: //Viral Agent
450  case 3828: //Construction Blocks
451  case 9830: //Rocket Fuel
452  case 9832: //Coolant
453  case 9836: //Consumer Electronics
454  case 9838: //Superconductors
455  case 9840: //Transmitter
456  case 9842: //Miniature Electronics
457  case 15317: //Genetically Enhanced Livestock
458  return 2;
459 
460  // P3 - Specialized Commodities
461  case 2344: //Condensates
462  case 2345: //Camera Drones
463  case 2346: //Synthetic Synapses
464  case 2348: //Gel-Matrix Biopaste
465  case 2349: //Supercomputers
466  case 2351: //Smartfab Units
467  case 2352: //Nuclear Reactors
468  case 2354: //Neocoms
469  case 2358: //Biotech Research Reports
470  case 2360: //Industrial Explosives
471  case 2361: //Hermetic Membranes
472  case 2366: //Hazmat Detection Systems
473  case 2367: //Cryoprotectant Solution
474  case 9834: //Guidance Systems
475  case 9846: //Planetary Vehicles
476  case 9848: //Robotics
477  case 12836: //Transcranial Microcontrollers
478  case 17136: //Ukomi Superconductors
479  case 17392: //Data Chips
480  case 17898: //High-Tech Transmitters
481  case 28974: //Vaccines
482  return 3;
483 
484  // P4 - Advanced Commodities
485  case 2867: //Broadcast Node
486  case 2868: //Integrity Response Drones
487  case 2869: //Nano-Factory
488  case 2870: //Organic Mortar Applicators
489  case 2871: //Recursive Computing Module
490  case 2872: //Self-Harmonizing Power Core
491  case 2875: //Sterile Conduits
492  case 2876: //Wetware Mainframe
493  return 4;
494  }
495  _log(PLANET__ERROR, "PIDataMgr::GetProductLevel() - Commodity product level not found for typeID: %u", typeID);
496  EvE::traceStack();
497  return 0;
498 }
499 
501 {
502  switch (typeID) {
503  // P0 - Raw Materials
504  case 2267: return "Base Metals";
505  case 2270: return "Noble Metals";
506  case 2272: return "Heavy Metals";
507  case 2306: return "Non-CS Crystals";
508  case 2307: return "Felsic Magma";
509  case 2268: return "Aqueous Liquids";
510  case 2308: return "Suspended Plasma";
511  case 2309: return "Ionic Solutions";
512  case 2310: return "Noble Gas";
513  case 2311: return "Reactive Gas";
514  case 2073: return "Microorganisms";
515  case 2286: return "Planktic Colonies";
516  case 2287: return "Complex Organisms";
517  case 2288: return "Carbon Compounds";
518  case 2305: return "Autotrophs";
519  // P1 - Basic Commodities
520  case 2389: return "Plasmoids";
521  case 2390: return "Electrolytes";
522  case 2392: return "Oxidizing Compound";
523  case 2393: return "Bacteria";
524  case 2395: return "Proteins";
525  case 2396: return "Biofuels";
526  case 2397: return "Industrial Fibers";
527  case 2398: return "Reactive Metals";
528  case 2399: return "Precious Metals";
529  case 2400: return "Toxic Metals";
530  case 2401: return "Chiral Structures";
531  case 3779: return "Biomass";
532  case 9828: return "Silicon";
533  case 3683: return "Oxygen";
534  case 3645: return "Water";
535  // P2 - Refined Commodities
536  case 44: return "Enriched Uranium";
537  case 2312: return "Supertensile Plastics";
538  case 2317: return "Oxides";
539  case 2319: return "Test Cultures";
540  case 2321: return "Polyaramids";
541  case 2327: return "Microfiber Shielding";
542  case 2328: return "Water-Cooled CPU";
543  case 2329: return "Biocells";
544  case 2463: return "Nanites";
545  case 3689: return "Mechanical Parts";
546  case 3691: return "Synthetic Oil";
547  case 3693: return "Fertilizer";
548  case 3695: return "Polytextiles";
549  case 3697: return "Silicate Glass";
550  case 3725: return "Livestock";
551  case 3775: return "Viral Agent";
552  case 3828: return "Construction Blocks";
553  case 9830: return "Rocket Fuel";
554  case 9832: return "Coolant";
555  case 9836: return "Consumer Electronics";
556  case 9838: return "Superconductors";
557  case 9840: return "Transmitter";
558  case 9842: return "Miniature Electronics";
559  case 15317: return "Genetically Enhanced Livestock";
560  // P3 - Specialized Commodities
561  case 2344: return "Condensates";
562  case 2345: return "Camera Drones";
563  case 2346: return "Synthetic Synapses";
564  case 2348: return "Gel-Matrix Biopaste";
565  case 2349: return "Supercomputers";
566  case 2351: return "Smartfab Units";
567  case 2352: return "Nuclear Reactors";
568  case 2354: return "Neocoms";
569  case 2358: return "Biotech Research Reports";
570  case 2360: return "Industrial Explosives";
571  case 2361: return "Hermetic Membranes";
572  case 2366: return "Hazmat Detection Systems";
573  case 2367: return "Cryoprotectant Solution";
574  case 9834: return "Guidance Systems";
575  case 9846: return "Planetary Vehicles";
576  case 9848: return "Robotics";
577  case 12836: return "Transcranial Microcontrollers";
578  case 17136: return "Ukomi Superconductors";
579  case 17392: return "Data Chips";
580  case 17898: return "High-Tech Transmitters";
581  case 28974: return "Vaccines";
582  // P4 - Advanced Commodities
583  case 2867: return "Broadcast Node";
584  case 2868: return "Integrity Response Drones";
585  case 2869: return "Nano-Factory";
586  case 2870: return "Organic Mortar Applicators";
587  case 2871: return "Recursive Computing Module";
588  case 2872: return "Self-Harmonizing Power Core";
589  case 2875: return "Sterile Conduits";
590  case 2876: return "Wetware Mainframe";
591  }
592  _log(PLANET__ERROR, "PIDataMgr::GetProductName() - Commodity product not found for typeID: %u", typeID);
593  return "NULL";
594 }
595 
Base Python wire object.
Definition: PyRep.h:66
uint16 outputQty
Definition: EVE_Planet.h:143
unsigned __int8 uint8
Definition: eve-compat.h:46
#define _log(type, fmt,...)
Definition: logsys.h:124
PlanetDB m_db
Definition: PlanetDataMgr.h:36
const char * GetProductName(uint16 typeID)
int32 GetInt(uint32 index) const
Definition: dbcore.cpp:635
void GetSchematicData(DBQueryResult &res)
Definition: PlanetDB.cpp:47
std::unordered_multimap< uint32, uint32 > m_planetData
Definition: PlanetDataMgr.h:38
uint32 GetMaxOutput(InventoryItemRef iRef, uint32 qtyPerCycle=0, int64 cycleTime=0)
uint8 GetProductLevel(uint16 typeID)
uint16 outputType
Definition: EVE_Planet.h:144
void _Populate()
Python tuple.
Definition: PyRep.h:567
signed __int8 int8
Definition: eve-compat.h:45
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
Definition: Colony.h:38
bool GetRow(DBResultRow &into)
Definition: dbcore.cpp:552
bool GetBool(uint32 index) const
Definition: dbcore.cpp:647
std::map< uint16, uint16 > inputs
Definition: EVE_Planet.h:148
#define is_log_enabled(type)
Definition: logsys.h:78
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
uint16 GetHeadType(uint16 ecuTypeID, uint16 programType)
const char * GetCommandName(int8 commandID)
double GetTimeMSeconds()
Definition: utils_time.cpp:104
int64 get_int()
Definition: EvilNumber.cpp:166
uint32 GetProgramOutputPrediction(InventoryItemRef iRef, int64 cycleTime, uint32 numCycles=0)
void GetPlanetData(uint32 planetID, std::vector< uint16 > &typeIDs)
uint32 get_uint32()
Definition: EvilNumber.cpp:173
Python integer.
Definition: PyRep.h:231
PyRep * GetProgramResultInfo(Colony *pColony, uint32 pinID, uint16 typeID, PyList *heads, float headRadius)
int Initialize()
unsigned __int32 uint32
Definition: eve-compat.h:50
uint32 GetProgramOutput(InventoryItemRef iRef, int64 cycleTime, int64 startTime=0, int64 currentTime=0)
double GetFileTimeNow()
Definition: utils_time.cpp:84
signed __int64 int64
Definition: eve-compat.h:51
int64 max(int64 x, int64 y=0)
Definition: misc.h:103
EvilNumber GetAttribute(const uint16 attrID) const
size_t size() const
Definition: PyRep.h:663
void traceStack(void)
Definition: misc.cpp:169
void GetSchematicData(uint8 schematicID, PI_Schematic &data)
#define PySafeDecRef(op)
Definition: PyRep.h:61
#define sItemFactory
Definition: ItemFactory.h:165
float get_float()
Definition: EvilNumber.cpp:184
void GetPlanetData(DBQueryResult &res)
Definition: PlanetDB.cpp:61
unsigned __int16 uint16
Definition: eve-compat.h:48
Python list.
Definition: PyRep.h:639
void GetSchematicTimes(DBQueryResult &res)
Definition: PlanetDB.cpp:54
void SetProgramResults(uint32 ecuID, uint16 typeID, uint16 numCycles, float headRadius, float cycleTime, uint32 qtyPerCycle)
Definition: Colony.cpp:832
Python long integer.
Definition: PyRep.h:261
static uint32 currentTime
Definition: timer.cpp:33