-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDysonSphereParser.h
More file actions
1976 lines (1793 loc) · 48.6 KB
/
DysonSphereParser.h
File metadata and controls
1976 lines (1793 loc) · 48.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Copyright (c) 2021, Aaron Shumate
// All rights reserved.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE.txt file in the root directory of this source tree.
//
// Dyson Sphere Program is developed by Youthcat Studio and published by Gamera Game.
#pragma once
#include <cinttypes>
#include <string>
#include <vector>
#include <map>
#include <fstream>
const float oilSpeedMultiplier = 4E-05f;
class DysonSphereParser
{
public:
class IntVector2
{
public:
IntVector2();
void parse(std::ifstream& strm);
int32_t x;
int32_t y;
};
class Vector3
{
public:
Vector3();
void parse(std::ifstream& strm);
float x;
float y;
float z;
};
class VectorLF3
{
public:
VectorLF3();
void parse(std::ifstream& strm);
double x;
double y;
double z;
};
class Quaternion
{
public:
Quaternion();
void parse(std::ifstream& strm);
float x;
float y;
float z;
float w;
};
class GameDesc
{
public:
GameDesc();
void parse(std::ifstream& strm);
int32_t version;
int32_t galaxyAlgo;
int32_t galaxySeed;
int32_t starCount;
int32_t playerProto;
float resourceMultiplier;
int32_t numThemeIds;
std::vector<int32_t> themeIds;
};
class GamePrefsData
{
public:
GamePrefsData();
void parse(std::ifstream& strm);
int32_t version;
VectorLF3 cameraUPos;
Quaternion cameraURot;
int32_t reformCursorSize;
int32_t numReplicatorMultipliers;
std::map<int32_t, int32_t> replicatorMultipliers;
bool detailPower;
bool detailVein;
bool detailSpaceGuide;
bool detailSign;
bool detailIcon;
int32_t numTutorialShowing;
std::vector<int32_t> tutorialShowing;
};
class TechState
{
public:
TechState();
void parse(std::ifstream& strm);
int32_t techProtoIndex;
bool unlocked;
int32_t curLevel;
int32_t maxLevel;
int64_t hashUploaded;
int64_t hashNeeded;
};
class GameHistoryData
{
public:
GameHistoryData();
void parse(std::ifstream& strm);
int32_t version;
int32_t numRecipeUnlocked;
std::vector<int32_t> recipeUnlocked;
int32_t numTutorialUnlocked;
std::vector<int32_t> tutorialUnlocked;
int32_t numFeatureKeys;
std::vector<int32_t> featureKeys;
int32_t numTechState;
std::vector<TechState> techStates;
bool autoManageLabItems;
int32_t currentTech;
int32_t numTechQueue;
std::vector<int32_t> techQueue;
int32_t universeObserveLevel;
float solarSailLife;
float solarEnergyLossRate;
bool useIonLayer;
int32_t inserterStackCount;
float logisticDroneSpeed;
float logisticDroneSpeedScale;
int32_t logisticDroneCarries;
float logisticShipSailSpeed;
float logisticShipWarpSpeed;
float logisticShipSpeedScale;
bool logisticShipWarpDrive;
int32_t logisticShipCarries;
float miningCostRate;
float miningSpeedScale;
int32_t storageLevel;
int32_t labLevel;
int32_t techSpeed;
float dysonNodeLatitude;
int64_t universeMatrixPointUploaded;
bool missionAccomplished;
};
class ProductStat
{
public:
ProductStat();
void parse(std::ifstream& strm);
int32_t version;
int32_t numCount;
std::vector<int32_t> count;
int32_t numCursor;
std::vector<int32_t> cursor;
int32_t numTotal;
std::vector<int32_t> total;
int32_t itemId;
};
class PowerStat
{
public:
PowerStat();
void parse(std::ifstream& strm);
int32_t version;
int32_t numEnergy;
std::vector<int64_t> energy;
int32_t numCursor;
std::vector<int32_t> cursor;
int32_t numTotal;
std::vector<int64_t> total;
int32_t itemId;
};
class FactoryProductionStat
{
public:
FactoryProductionStat();
void parse(std::ifstream& strm);
int32_t version;
int32_t productCapacity;
int32_t productCursor;
std::vector<ProductStat> productPool;
int32_t numPowerPool;
std::vector<PowerStat> powerPool;
int32_t numProductIndices;
std::vector<int32_t> productIndices;
int64_t energyConsumption;
};
class ProductionStatistics
{
public:
ProductionStatistics();
void parse(std::ifstream& strm);
int32_t version;
int32_t numFactoryStatPool;
std::vector<FactoryProductionStat> factoryStatPool;
int32_t numFirstCreateIds;
std::vector<int32_t> firstCreateIds;
int32_t numFavoriteIds;
std::vector<int32_t> favoriteIds;
};
class GameStatData
{
public:
GameStatData();
void parse(std::ifstream& strm);
int32_t version;
int32_t numTechHashedHistory;
std::vector<int32_t> techHashedHistory;
ProductionStatistics production;
};
class StorageComponent
{
public:
StorageComponent();
void parse(std::ifstream& strm);
struct GRID
{
int32_t itemId;
int32_t filter;
int32_t count;
int32_t stackSize;
};
int32_t version;
int32_t id;
int32_t entityId;
int32_t previous;
int32_t next;
int32_t bottom;
int32_t top;
enum class EStorageType { Default = 0, Fuel = 1, Filtered = 9 };
EStorageType type;
int32_t gridSize;
int32_t bans;
std::vector<GRID> grids;
};
class ForgeTask
{
public:
ForgeTask();
void parse(std::ifstream& strm);
int32_t version;
int32_t recipeId;
int32_t count;
int32_t tick;
int32_t tickSpend;
int32_t numItem;
int32_t numProduct;
std::vector<int32_t> itemIds;
std::vector<int32_t> itemCounts;
std::vector<int32_t> served;
std::vector<int32_t> productIds;
std::vector<int32_t> productCounts;
std::vector<int32_t> produced;
int32_t parentTaskIndex;
};
class MechaForge
{
public:
MechaForge();
void parse(std::ifstream& strm);
int32_t version;
int32_t numTasks;
std::vector<ForgeTask> tasks;
};
class MechaLab
{
public:
MechaLab();
void parse(std::ifstream& strm);
int32_t version;
int32_t numItemPoints;
std::map<int32_t, int32_t> itemPoints;
};
class MechaDrone
{
public:
MechaDrone();
void parse(std::ifstream& strm);
int32_t version;
int32_t stage;
Vector3 position;
Vector3 target;
Vector3 forward;
float speed;
int32_t movement;
int32_t targetObject;
float progress;
Vector3 initialVector;
};
class Mecha
{
public:
Mecha();
void parse(std::ifstream& strm);
int32_t version;
double coreEnergyCap;
double coreEnergy;
double corePowerGen;
double reactorPowerGen;
double reactorEnergy;
int32_t reactorItemId;
StorageComponent reactorStorage;
StorageComponent warpStorage;
double walkPower;
double jumpEnergy;
double thrustPowerPerAcc;
double warpKeepingPowerPerSpeed;
double warpStartPowerPerSpeed;
double miningPower;
double replicatePower;
double researchPower;
double droneEjectEnergy;
double droneEnergyPerMeter;
int32_t coreLevel;
int32_t thrusterLevel;
float miningSpeed;
float replicateSpeed;
float walkSpeed;
float jumpSpeed;
float maxSailSpeed;
float maxWarpSpeed;
float buildArea;
MechaForge forge;
MechaLab lab;
int32_t droneCount;
float droneSpeed;
int32_t droneMovement;
std::vector<MechaDrone> drones;
};
class PlayerNavigation
{
public:
PlayerNavigation();
void parse(std::ifstream& strm);
int32_t version;
bool navigating;
int32_t naviAstroId;
VectorLF3 naviTarget;
bool useFly;
bool useSail;
bool useWarp;
enum class ENaviStage { None, Departure, OriginOrbit, AccOrbit, Space, DestOrbit, Approaching };
ENaviStage stage;
double flyThreshold;
double sailThreshold;
double warpThreshold;
double maxSailSpeed;
};
class Player
{
public:
Player();
void parse(std::ifstream& strm);
int32_t version;
int32_t planetId;
Vector3 position;
VectorLF3 uPosition;
Quaternion uRotation;
enum class EMovementState { Walk, Drift, Fly, Sail };
EMovementState movementState;
float warpState;
bool warpCommand;
VectorLF3 uVelocity;
int32_t inhandItemId;
int32_t inhandItemCount;
Mecha mecha;
StorageComponent package;
PlayerNavigation navigation;
int32_t sandCount;
};
class GalacticTransport
{
public:
GalacticTransport();
void parse(std::ifstream& strm);
int32_t version;
};
enum class EVeinType
{
None, Iron, Copper, Silicium, Titanium, Stone, Coal, Oil, Fireice, Diamond, Fractal, Crysrub, Grat, Bamboo, Mag
};
static const char* toString(const EVeinType type)
{
if (type == EVeinType::None) return "None";
if (type == EVeinType::Iron) return "Iron Ore";
if (type == EVeinType::Copper) return "Copper Ore";
if (type == EVeinType::Silicium) return "Silicon Ore";
if (type == EVeinType::Titanium) return "Titanium Ore";
if (type == EVeinType::Stone) return "Stone Ore";
if (type == EVeinType::Coal) return "Coal Ore";
if (type == EVeinType::Oil) return "Crude Oil";
if (type == EVeinType::Fireice) return "Fire Ice";
if (type == EVeinType::Diamond) return "Kimberlite Ore";
if (type == EVeinType::Fractal) return "Fractal Silicon";
if (type == EVeinType::Crysrub) return "Crysrub"; // ? Spiniform Stalagmite Crystal
if (type == EVeinType::Grat) return "Optical Grating Crystal";
if (type == EVeinType::Bamboo) return "Bamboo"; // ?
if (type == EVeinType::Mag) return "Unipolar Magnet";
return "ERROR";
}
class VeinGroup
{
public:
VeinGroup();
void parse(std::ifstream& strm);
EVeinType type;
Vector3 pos;
int32_t count;
int64_t amount;
};
class PlanetData
{
public:
PlanetData();
void parse(std::ifstream& strm);
int32_t modDataByteCount;
std::vector<uint8_t> modData;
int32_t numVeinAmounts;
std::vector<int64_t> veinAmounts; // The index is the EVeinType. This contains the total of the veinGroups's amounts which is also the total of the VeinData::amounts.
int32_t numVeinGroups;
std::vector<VeinGroup> veinGroups;
};
class EntityData
{
public:
EntityData();
void parse(std::ifstream& strm);
uint8_t version;
int32_t id;
int16_t protoId;
int16_t modelIndex;
Vector3 pos;
Quaternion rot;
int32_t beltId;
int32_t splitterId;
int32_t storageId;
int32_t tankId;
int32_t minerId;
int32_t inserterId;
int32_t assemblerId;
int32_t fractionateId;
int32_t ejectorId;
int32_t siloId;
int32_t labId;
int32_t stationId;
int32_t powerNodeId;
int32_t powerGenId;
int32_t powerConId;
int32_t powerAccId;
int32_t powerExcId;
int32_t monsterId;
};
class AnimData
{
public:
AnimData();
void parse(std::ifstream& strm);
float time;
float prepare_length;
float working_length;
uint32_t state;
float power;
};
class SignData
{
public:
SignData();
void parse(std::ifstream& strm);
uint32_t signType;
uint32_t iconType;
uint32_t iconId0;
uint32_t iconId1;
uint32_t iconId2;
uint32_t iconId3;
float count0;
float count1;
float count2;
float count3;
float x;
float y;
float z;
float w;
};
class PrebuildData
{
public:
PrebuildData();
void parse(std::ifstream& strm);
uint8_t version;
int32_t id;
int16_t protoId;
int16_t modelIndex;
Vector3 pos;
Quaternion rot;
Vector3 pos2;
Quaternion rot2;
int32_t upEntity;
int16_t pickOffset;
int16_t insertOffset;
int32_t recipeId;
int32_t filterId;
int32_t refCount;
std::vector<int32_t> refArr;
};
class VegeData
{
public:
VegeData();
void parse(std::ifstream& strm);
uint8_t version;
int32_t id;
int16_t protoId;
int16_t modelIndex;
int16_t hp;
Vector3 pos;
Quaternion rot;
Vector3 scl;
};
class VeinData
{
public:
VeinData();
void parse(std::ifstream& strm);
uint8_t version;
int32_t id;
EVeinType type;
int16_t modelIndex;
int16_t groupIndex;
int32_t amount;
int32_t productId;
Vector3 pos;
int32_t minerCount;
int32_t minerId0;
int32_t minerId1;
int32_t minerId2;
int32_t minerId3;
};
class Cargo
{
public:
Cargo();
void parse(std::ifstream& strm);
int32_t item;
Vector3 position;
Quaternion rotation;
};
class CargoContainer
{
public:
CargoContainer();
void parse(std::ifstream& strm);
int32_t version;
int32_t poolCapacity;
int32_t cursor;
int32_t recycleBegin;
int32_t recycleEnd;
std::vector<Cargo> cargoPool;
std::vector<int32_t> recycleIds;
};
class BeltComponent
{
public:
BeltComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t speed;
int32_t segPathId;
int32_t segIndex;
int32_t segPivotOffset;
int32_t segLength;
int32_t outputId;
int32_t backInputId;
int32_t leftInputId;
int32_t rightInputId;
};
class SplitterComponent
{
public:
SplitterComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t beltA;
int32_t beltB;
int32_t beltC;
int32_t beltD;
int32_t input0;
int32_t input1;
int32_t input2;
int32_t input3;
int32_t output0;
int32_t output1;
int32_t output2;
int32_t output3;
bool inPriority;
bool outPriority;
int32_t outFilter;
};
class CargoPath
{
public:
CargoPath();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t capacity;
int32_t bufferLength;
int32_t chunkCapacity;
int32_t chunkCount;
int32_t updateLen;
bool closed;
int32_t outputPathIdForImport;
int32_t outputIndex;
int32_t numBelts;
int32_t numInputPaths;
std::vector<uint8_t> buffer;
std::vector<int32_t> chunks;
std::vector<Vector3> pointPos;
std::vector<Quaternion> pointRot;
std::vector<int32_t> belts;
std::vector<int32_t> inputPaths;
};
class CargoTraffic
{
public:
CargoTraffic();
void parse(std::ifstream& strm);
int32_t version;
int32_t beltCursor;
int32_t beltCapacity;
int32_t beltRecycleCursor;
int32_t splitterCursor;
int32_t splitterCapacity;
int32_t splitterRecycleCursor;
int32_t pathCursor;
int32_t pathCapacity;
int32_t pathRecycleCursor;
std::vector<BeltComponent> beltPool;
std::vector<int32_t> beltRecycle;
std::vector<SplitterComponent> splitterPool;
std::vector<int32_t> splitterRecycle;
std::vector<int32_t> cargoPathIndex;
std::vector<CargoPath> pathPool;
std::vector<int32_t> pathRecycle;
};
class TankComponent
{
public:
TankComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t lastTankId;
int32_t nextTankId;
int32_t belt0;
int32_t belt1;
int32_t belt2;
int32_t belt3;
bool isOutput0;
bool isOutput1;
bool isOutput2;
bool isOutput3;
int32_t fluidStorageCount;
int32_t currentCount;
int32_t fluidId;
bool outputSwitch;
bool inputSwitch;
bool isBottom;
};
class FactoryStorage
{
public:
FactoryStorage();
void parse(std::ifstream& strm);
int32_t version;
int32_t storageCursor;
int32_t storageCapacity;
int32_t storageRecycleCursor;
std::vector<int32_t> storagePoolIndex;
std::vector<int32_t> storagePoolSize;
std::vector<StorageComponent> storagePool;
std::vector<int32_t> storageRecycle;
int32_t tankCapacity;
int32_t tankCursor;
int32_t tankRecycleCursor;
std::vector<TankComponent> tankPool;
std::vector<int32_t> tankRecycle;
};
class PowerGeneratorComponent
{
public:
PowerGeneratorComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t networkId;
bool photovoltaic;
bool wind;
bool gamma;
int64_t genEnergyPerTick;
int64_t useFuelPerTick;
int16_t fuelMask;
int64_t fuelEnergy;
int16_t curFuelId;
int16_t fuelId;
int16_t fuelCount;
int64_t fuelHeat;
int32_t catalystId;
int32_t catalystPoint;
int32_t productId;
float productCount;
int64_t productHeat;
float warmup;
float ionEnhance;
float x;
float y;
float z;
};
class PowerNodeComponent
{
public:
PowerNodeComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t networkId;
bool isCharger;
int32_t workEnergyPerTick;
int32_t idleEnergyPerTick;
int32_t requiredEnergy;
Vector3 powerPoint;
float connectDistance;
float coverRadius;
};
class PowerConsumerComponent
{
public:
PowerConsumerComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t networkId;
Vector3 plugPos;
int64_t requiredEnergy;
int64_t servedEnergy;
int64_t workEnergyPerTick;
int64_t idleEnergyPerTick;
};
class PowerAccumulatorComponent
{
public:
PowerAccumulatorComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t networkId;
int64_t inputEnergyPerTick;
int64_t outputEnergyPerTick;
int64_t curEnergy;
int64_t maxEnergy;
};
class PowerExchangerComponent
{
public:
PowerExchangerComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t networkId;
int16_t emptyCount;
int16_t fullCount;
float targetState;
float state;
int64_t energyPerTick;
int64_t curPoolEnergy;
int64_t poolMaxEnergy;
int32_t emptyId;
int32_t fullId;
int32_t belt0;
int32_t belt1;
int32_t belt2;
int32_t belt3;
bool isOutput0;
bool isOutput1;
bool isOutput2;
bool isOutput3;
int32_t outputSlot;
int32_t inputSlot;
int32_t outputRectify;
int32_t inputRectify;
};
class PowerNetworkStructures_Node
{
public:
PowerNetworkStructures_Node();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
float x;
float y;
float z;
float connDistance2;
float coverRadius2;
int32_t genId;
int32_t accId;
int32_t excId;
int32_t numConnIdsForLoad;
int32_t numLineIdsForLoad;
int32_t numConsumers;
std::vector<int32_t> connIdsForLoad;
std::vector<int32_t> lineIdsForLoad;
std::vector<int32_t> consumers;
};
class PowerNetwork
{
public:
PowerNetwork();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t numNodes;
int32_t numConsumers;
int32_t numGenerators;
int32_t numAccumulators;
int32_t numExchangers;
std::vector<PowerNetworkStructures_Node> nodes;
std::vector<int32_t> consumers;
std::vector<int32_t> generators;
std::vector<int32_t> accumulators;
std::vector<int32_t> exchangers;
};
class PowerSystem
{
public:
PowerSystem();
void parse(std::ifstream& strm);
int32_t version;
int32_t generatorCapacity;
int32_t genCursor;
int32_t genRecycleCursor;
std::vector<PowerGeneratorComponent> genPool;
std::vector<int32_t> genRecycle;
int32_t nodeCapacity;
int32_t nodeCursor;
int32_t nodeRecycleCursor;
std::vector<PowerNodeComponent> nodePool;
std::vector<int32_t> nodeRecycle;
int32_t consumerCapacity;
int32_t consumerCursor;
int32_t consumerRecycleCursor;
std::vector<PowerConsumerComponent> consumerPool;
std::vector<int32_t> consumerRecycle;
int32_t accumulatorCapacity;
int32_t accCursor;
int32_t accRecycleCursor;
std::vector<PowerAccumulatorComponent> accPool;
std::vector<int32_t> accRecycle;
int32_t exchangerCapacity;
int32_t excCursor;
int32_t excRecycleCursor;
std::vector<PowerExchangerComponent> excPool;
std::vector<int32_t> excRecycle;
int32_t networkCapacity;
int32_t netCursor;
int32_t netRecycleCursor;
std::vector<int32_t> powerNetworkIncludedFlag;
std::vector<PowerNetwork> netPool;
std::vector<int32_t> netRecycle;
};
class MinerComponent
{
public:
MinerComponent();
void parse(std::ifstream& strm);
int32_t version;
int32_t id;
int32_t entityId;
int32_t pcId;
enum class EMinerType { None, Water, Vein, Oil };
EMinerType type;
int32_t speed;
int32_t time;
int32_t period;
int32_t insertTarget;
enum class EWorkState { Idle, Running, Outputing, Lack, Full };
EWorkState workstate;
int32_t veinCount;
std::vector<int32_t> veins;
int32_t currentVeinIndex;
int32_t minimumVeinAmount;
int32_t productId;
int32_t productCount;
uint32_t seed;
};
class InserterComponent