forked from Xiloe/DSP-Save-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDSP.bt
More file actions
1519 lines (1320 loc) · 33.4 KB
/
DSP.bt
File metadata and controls
1519 lines (1320 loc) · 33.4 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
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: DSP.bt
// Authors: Xiloe, Wembly
// Version: 1.1
// Purpose: Map DSP save data to the hex
//------------------------------------------------
LittleEndian();
void error_message(string msg) {
Warning(msg);
Printf(msg + "\n");
}
typedef enum <byte> {
False,
True
} bool;
typedef struct
{
// only supports 128 byte length strings,
// to add longer strings see:
// https://stackoverflow.com/questions/45601311/010-editor-template-parsing-7-bit-encoded-int-for-length-prefixed-string
byte len;
byte value[len];
} dnstring <read=netstring_read, optimize=false>;
wstring netstring_read(dnstring &s) {
return StringToWString(s.value, CHARSET_UTF8);
}
typedef struct {
int32 id;
int32 value;
} T_KEYPAIR;
typedef struct {
float x;
float y;
float z;
} T_VEC_SINGLE;
typedef struct {
double x;
double y;
double z;
} T_VEC_DOUBLE;
typedef struct {
float x;
float y;
float z;
float w;
} T_QUATERNION;
typedef struct {
byte signature [6];
int64 filesize;
int32 header_version;
int32 major;
int32 minor;
int32 release;
int64 game_tick;
int64 save_time;
int32 png_length;
if (png_length !=0)
byte image_data [ png_length ];
} T_HEADER_DATA <optimize=false>;
typedef struct {
int32 id;
bool unlocked;
int32 cur_level;
int32 max_level;
int64 hash_uploaded;
int64 hash_needed;
} T_TECH_PROTO;
typedef struct {
double camera_pos_x;
double camera_pos_y;
double camera_pos_z;
float camera_rot_x;
float camera_rot_y;
float camera_rot_z;
float camera_rot_w;
} T_CAMERA_POS;
typedef struct {
bool detail_power;
bool detail_vein;
bool detail_space_guide;
bool detail_sign;
bool detail_icon;
} T_DETAILS;
typedef struct {
int32 num;
int32 galaxy_algo;
int32 galaxy_seed;
int32 star_count;
int32 player_proto;
if (num >= 2)
float resources_multiplier;
int32 theme_id_length;
int32 theme_ids [ theme_id_length ];
int64 game_tick;
int32 num;
T_CAMERA_POS camera_position;
if (num >= 1)
{
int32 reform_cursor_size;
int32 replicator_multipliers_count;
T_KEYPAIR multipliers [ replicator_multipliers_count ];
T_DETAILS details;
int32 tutorial_showing_count;
if (tutorial_showing_count > 0) {
int32 tutorial_showing_item_id [ tutorial_showing_count ];
}
}
} T_PREFERENCES_DATA <optimize=false>;
typedef struct {
int32 num;
int32 unlocked_recipes_count;
int32 unlocked_item_recipe_item_id [ unlocked_recipes_count ];
if (num >= 2)
{
int32 unlocked_tutorial_count;
int32 unlocked_tutorial_item_id [ unlocked_tutorial_count ];
}
int32 feature_keys_count;
int32 feature_keys_item [ feature_keys_count ];
int32 tech_proto_count;
T_TECH_PROTO tech_protos [ tech_proto_count ];
bool auto_manage_lab_items;
int32 current_tech_id;
int32 tech_queue_size;
int32 tech_state [ tech_queue_size ];
int32 universe_observe_level;
float solar_sail_life;
float solar_energy_loss_rate;
bool use_ion_layer;
int32 inserter_stack_count;
float logistic_drone_speed;
float logistic_drone_speedScale;
int32 logistic_drone_carries;
float logistic_ship_sail_speed;
float logistic_ship_warp_speed;
float logistic_ship_speed_scale;
byte logistic_ship_warp_drive;
int32 logistic_ship_carries;
float mining_cost_rate;
float mining_speed_scale;
int32 storage_level;
int32 lab_level;
int32 tech_speed;
float dyson_node_latitude;
int64 universe_matrix_point_uploaded;
bool mission_accomplished;
} T_HISTORY_DATA <optimize=false>;
typedef struct {
int32 version;
int32 count_len;
int32 count[count_len];
int32 cursor_len;
int32 cursur[cursor_len];
int32 total_len;
int32 total[total_len];
int32 item_id;
} T_PRODUCT_STAT <optimize=false>;
typedef struct {
int32 version;
int32 energy_len;
int64 energy[energy_len];
int32 cursor_len;
int32 cursor[cursor_len];
int32 total_len;
int64 total[total_len];
} T_POWER_STAT <optimize=false>;
typedef struct {
int32 version;
int32 product_capacity;
int32 product_cursor;
T_PRODUCT_STAT product_pool [ product_cursor - 1 ];
int32 power_pools_total;
T_POWER_STAT power_stats[Min(5, power_pools_total)];
int32 product_indices_count;
int32 product_indices [ product_indices_count ];
if (version >= 1) {
int64 energy_consumption;
}
} T_FACTORY_PRODUCTION_STAT <optimize=false>;
typedef struct {
int32 num;
int32 factory_stat_pool_count;
T_FACTORY_PRODUCTION_STAT factory_state_pool [ factory_stat_pool_count ];
int32 first_create_ids_count;
int32 first_create_ids [ first_create_ids_count ];
int32 favorite_ids_count;
int32 favorite_ids [ favorite_ids_count ];
} T_PRODUCTION_STATISTICS <optimize=false>;
typedef struct {
int32 num;
int32 tech_hashed_history_length;
int32 tech_hashed_history [ tech_hashed_history_length ];
T_PRODUCTION_STATISTICS production;
} T_GAME_STAT_DATA <optimize=false>;
typedef enum <int32> {
Default,
Fuel,
Filtered = 9
} T_E_STORAGE_TYPE;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
if (version >= 1) {
int32 previous;
int32 next;
int32 bottom;
int32 top;
}
T_E_STORAGE_TYPE type;
int32 size;
if (version >= 1) {
int32 bans;
}
struct {
int32 item_id;
int32 filter;
int32 count;
int32 stack_size;
} grids[size];
} T_STORAGE_COMPONENT <optimize=false>;
typedef struct {
int32 version;
int32 recipe_id;
int32 count;
int32 tick;
int32 tick_spend;
int32 item_ids_len;
int32 product_len;
struct {
int32 item_id;
int32 counts;
int32 served;
} items[item_ids_len];
struct {
int32 id;
int32 count;
int32 produced;
} product[product_len];
int32 parent_task_index;
} T_FORGE_TASK <optimize=false>;
typedef struct {
int32 version;
int32 len;
T_FORGE_TASK tasks[len];
} T_MECHA_FORGE <optimize=false>;
typedef struct {
int32 version;
int32 items_len;
T_KEYPAIR items[items_len];
} T_MECHA_LAB <optimize=false>;
typedef struct {
int32 version;
int32 stage;
T_VEC_SINGLE position;
T_VEC_SINGLE target;
T_VEC_SINGLE forward;
float speed;
int32 movement;
int32 target_object;
float progress;
T_VEC_SINGLE initial_vector;
} T_MECHA_DRONE;
typedef struct {
int32 version;
double core_energy_cap;
double core_energy;
double core_power_gen;
double reactor_power_gen;
double reactor_energy;
int32 reactor_item_id;
T_STORAGE_COMPONENT reactor_storage;
T_STORAGE_COMPONENT warp_storage;
double walk_power;
double jump_energy;
double thrust_power_per_acc;
double warp_keeping_ower_per_speed;
double warp_start_power_per_speed;
double mining_power;
double replicate_power;
double research_power;
double drone_eject_energy;
double drone_energy_per_meter;
int32 core_level;
int32 thruster_level;
float mining_speed;
float replicate_speed;
float walk_speed;
float jump_speed;
float max_sail_speed;
float max_Warp_speed;
float build_area;
T_MECHA_FORGE forge;
T_MECHA_LAB lab;
int32 drone_count;
float drone_speed;
int32 drone_movement;
T_MECHA_DRONE drones[drone_count];
} T_MECHA <optimize=false>;
typedef enum <int32> {
None,
Departure,
OriginOrbit,
AccOrbit,
Space,
DestOrbit,
Approaching
} T_E_NAVI_STAGE;
typedef struct {
int32 version;
bool navigating;
int32 navi_astro_id;
T_VEC_DOUBLE navi_target;
bool use_fly;
bool use_sail;
bool use_warp;
T_E_NAVI_STAGE stage;
double fly_threshold;
double sail_threshold;
double warp_threshold;
double max_sail_speed;
} T_PLAYER_NAVIGATION;
typedef enum <int32> {
Walk,
Drift,
Fly,
Sail
} T_E_MOVEMENT_STATE;
typedef struct {
int32 version;
int32 planet_id;
T_VEC_SINGLE position;
T_VEC_DOUBLE u_position;
T_QUATERNION u_rotation;
T_E_MOVEMENT_STATE movement_state;
float warp_state;
bool warp_command;
T_VEC_DOUBLE u_velocity;
int32 in_hand_item_id;
int32 in_hand_item_count;
T_MECHA mecha;
T_STORAGE_COMPONENT package;
if (version >= 1) {
T_PLAYER_NAVIGATION navigation;
}
int32 sand_count;
} T_PLAYER;
typedef struct {
int32 version;
} T_GALACTIC_TRANSPORT;
typedef struct {
float time;
float prepare_length;
float working_length;
uint32 state;
float power;
} T_ANIM_DATA;
typedef struct {
uint32 sign_type;
uint32 icon_type;
uint32 icon_id_0;
uint32 icon_id_1;
uint32 icon_id_2;
uint32 icon_id_3;
float count_0;
float count_1;
float count_2;
float count_3;
T_QUATERNION r;
} T_SIGN_DATA;
// original size is byte, using int16 here to allow for the casting that occurs
typedef enum <int16> {
T_E_VEIN_TYPE16_None,
T_E_VEIN_TYPE16_Iron,
T_E_VEIN_TYPE16_Copper,
T_E_VEIN_TYPE16_Silicium,
T_E_VEIN_TYPE16_Titanium,
T_E_VEIN_TYPE16_Stone,
T_E_VEIN_TYPE16_Coal,
T_E_VEIN_TYPE16_Oil,
T_E_VEIN_TYPE16_Fireice,
T_E_VEIN_TYPE16_Diamond,
T_E_VEIN_TYPE16_Fractal,
T_E_VEIN_TYPE16_Crysrub,
T_E_VEIN_TYPE16_Grat,
T_E_VEIN_TYPE16_Bamboo,
T_E_VEIN_TYPE16_Mag,
T_E_VEIN_TYPE16_Max
} T_E_VEIN_TYPE16;
// duplicated since this enum is read as two different sizes
typedef enum <int32> {
T_E_VEIN_TYPE32_None,
T_E_VEIN_TYPE32_Iron,
T_E_VEIN_TYPE32_Copper,
T_E_VEIN_TYPE32_Silicium,
T_E_VEIN_TYPE32_Titanium,
T_E_VEIN_TYPE32_Stone,
T_E_VEIN_TYPE32_Coal,
T_E_VEIN_TYPE32_Oil,
T_E_VEIN_TYPE32_Fireice,
T_E_VEIN_TYPE32_Diamond,
T_E_VEIN_TYPE32_Fractal,
T_E_VEIN_TYPE32_Crysrub,
T_E_VEIN_TYPE32_Grat,
T_E_VEIN_TYPE32_Bamboo,
T_E_VEIN_TYPE32_Mag,
T_E_VEIN_TYPE32_Max
} T_E_VEIN_TYPE32;
typedef struct {
int32 count;
byte mod_data[count];
int32 vein_amounts_len;
int64 vein_amounts[vein_amounts_len];
int32 vein_groups_len;
struct {
T_E_VEIN_TYPE32 type;
T_VEC_SINGLE pos;
int32 count;
int64 amount;
} vein_groups[vein_groups_len];
} T_PLANET_DATA <optimize=false>;
typedef struct {
byte version;
int32 id;
int16 proto_id;
int16 model_index;
T_VEC_SINGLE pos;
T_QUATERNION rot;
int32 belt_id;
int32 splitter_id;
int32 storage_id;
int32 tank_id;
int32 miner_id;
int32 inserter_id;
int32 assembler_id;
int32 fractionate_id;
int32 ejector_id;
int32 silo_id;
int32 lab_id;
int32 station_id;
int32 power_node_id;
int32 power_gen_id;
int32 power_con_id;
int32 power_acc_id;
int32 power_exc_id;
int32 monster_id;
} T_ENTITY_DATA;
typedef struct {
byte version;
int16 id;
int16 model_index;
T_VEC_SINGLE pos;
T_QUATERNION rot;
T_VEC_SINGLE pos2;
T_QUATERNION rot2;
int32 up_entity;
int16 pick_offset;
int16 insert_offset;
int32 recipe_id;
int32 filter_id;
int32 ref_count;
if (ref_count > 0) {
int32 ref_arr[ref_count];
}
} T_PREBUILD_DATA <optimize=false>;
typedef struct {
byte version;
int32 id;
int16 proto_id;
int16 model_index;
int16 hp;
T_VEC_SINGLE pos;
T_QUATERNION rot;
T_VEC_SINGLE scl;
} T_VEGE;
typedef struct {
byte version;
int32 id;
T_E_VEIN_TYPE16 type;
int16 model_index;
int16 group_index;
int32 amount;
int32 product_id;
T_VEC_SINGLE pos;
int32 miner_count;
int32 miner_id_0;
int32 miner_id_1;
int32 miner_id_2;
int32 miner_id_3;
} T_VEIN_DATA;
typedef struct {
int32 item;
T_VEC_SINGLE position;
T_QUATERNION rotation;
} T_CARGO;
typedef struct {
int32 version;
int32 pool_capacity;
int32 cursor;
int32 recycle_begin;
int32 recycle_end;
T_CARGO cargo_pool[cursor];
int32 recycle_ids[pool_capacity];
} T_CARGO_CONTAINER <optimize=false>;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 speed;
int32 seg_path_id;
int32 seg_index;
int32 seg_pivot_offset;
int32 seg_length;
int32 output_id;
int32 back_input_id;
int32 left_input_id;
int32 right_input_id;
} T_BELT_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 belt_a;
int32 belt_b;
int32 belt_c;
int32 belt_d;
int32 input_0;
int32 input_1;
int32 input_2;
int32 input_3;
int32 output_1;
int32 output_2;
int32 output_3;
bool in_priority;
bool out_priority;
int32 out_filter;
} T_SPLITTER_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 capacity;
int32 buffer_length;
int32 chunk_capacity;
int32 chunk_count;
int32 update_len;
bool closed;
int32 output_path_id_for_import;
int32 output_index;
int32 belts_len;
int32 input_paths_len;
byte buffer[buffer_length];
struct {
int32 row[3];
} chunks[chunk_count];
local int i = 0;
for (i = 0; i < buffer_length; i++) {
T_VEC_SINGLE point_pos;
T_QUATERNION point_rot;
}
int32 belts[belts_len];
int32 input_paths[input_paths_len];
} T_CARGO_PATH <optimize=false>;
typedef struct {
int32 version;
int32 belt_cursor;
int32 belt_capacity;
int32 belt_recycle_cursor;
int32 splitter_cursor;
int32 splitter_capacity;
int32 splitter_recycle_cursor;
int32 path_cursor;
int32 path_capacity;
int32 path_recycle_cursor;
if (belt_cursor > 1) {
T_BELT_COMPONENT belt_pool[belt_cursor-1];
}
int32 belt_recycle[belt_recycle_cursor];
if (splitter_cursor > 1) {
T_SPLITTER_COMPONENT splitter_pool[splitter_cursor-1];
}
int32 splitter_recycle[splitter_recycle_cursor];
struct {
int32 idx;
if (idx != 0) {
T_CARGO_PATH data;
}
} path_pool[path_cursor-1];
int32 path_recycle[path_recycle_cursor];
} T_CARGO_TRAFFIC <optimize=false>;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 last_tank_id;
int32 next_tank_id;
int32 belt_0;
int32 belt_1;
int32 belt_2;
int32 belt_3;
bool is_output_0;
bool is_output_1;
bool is_output_2;
bool is_output_3;
int32 fluid_storage_count;
int32 current_count;
int32 fluid_id;
bool output_switch;
bool input_switch;
bool is_bottom;
} T_TANK_COMPONENT;
typedef struct {
int32 version;
int32 storage_cursor;
int32 storage_capacity;
int32 storage_recycle_cursor;
local int i;
for (i = 0; i < storage_cursor-1; i++) {
int32 storage_recycle_idx;
if (idx != 0) {
int32 size;
T_STORAGE_COMPONENT storage_recycle;
}
}
int32 storage_recycle[storage_recycle_cursor];
int32 tank_capacity;
int32 tank_cursor;
int32 recycle_cursor;
T_TANK_COMPONENT tank_pool[tank_cursor-1];
int32 tank_recycle[tank_recycle_cursor];
} T_FACTORY_STORAGE <optimize=false>;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 network_id;
bool photovoltaic;
bool wind;
bool gamma;
int64 gen_energy_per_tick;
int64 use_fuel_per_tick;
int16 fuel_mask;
int64 fuel_energy;
int16 cur_fuel_id;
int16 fuel_id;
int16 fuel_count;
int64 fuel_heat;
int32 catalyst_id;
int32 catalyst_point;
float product_count;
int64 product_heat;
float warmup;
float ion_enhance;
T_VEC_SINGLE p;
} T_GENERATOR_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 network_id;
bool is_charger;
int32 work_energy_per_tick;
int32 idle_energy_per_tick;
int32 required_energy;
T_VEC_SINGLE power_point;
float connect_distance;
float cover_radius;
} T_POWER_NODE_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 network_id;
T_VEC_SINGLE plug_pos;
int64 required_energy;
int64 served_energy;
int64 work_energy_per_tick;
int64 idle_energy_per_tick;
} T_POWER_CONSUMER_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 network_id;
int64 input_energy_per_tick;
int64 output_energy_per_tick;
int64 cur_energy;
int64 max_energy;
} T_POWER_ACCUMULATOR_COMPONENT;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 network_id;
int16 empty_count;
int16 full_count;
float target_state;
float state;
int64 energy_per_tick;
int64 cur_pool_energy;
int64 pool_max_energy;
int32 empty_id;
int32 full_id;
if (version >= 1) {
int32 belt_0;
int32 belt_1;
int32 belt_2;
int32 belt_3;
bool is_output_0;
bool is_output_1;
bool is_output_2;
bool is_output_3;
int32 output_slot;
int32 input_slot;
int32 output_rectify;
int32 input_rectify;
}
} T_POWER_EXCHANGER_COMPONENT;
typedef struct {
int32 version;
int32 id;
T_VEC_SINGLE p;
float conn_distance_2;
float cover_radius_2;
int32 gen_id;
int32 acc_id;
int32 exc_id;
int32 conn_ids_for_load_len;
int32 line_ids_for_load_len;
int32 consumers_len;
int32 conn_ids_for_load[conn_ids_for_load_len];
int32 line_ids_for_load[line_ids_for_load_len];
int32 consumers[consumers_len];
} T_NODE <optimize=false>;
typedef struct {
int32 version;
int32 id;
int32 nodes_len;
int32 consumers_len;
int32 generators_len;
int32 accumulators_len;
int32 exchangers_len;
T_NODE nodes[nodes_len];
int32 consumers[consumers_len];
int32 generators[generators_len];
int32 accumulators[accumulators_len];
int32 exchangers[exchangers_len];
} T_POWER_NETWORK <optimize=false>;
typedef struct {
int32 version;
int32 generator_capacity;
int32 gen_cursor;
int32 gen_recycle_cursor;
T_GENERATOR_COMPONENT gen_pool[gen_cursor-1];
int32 gen_recycle[gen_recycle_cursor];
int32 node_capacity;
int32 node_cursor;
int32 node_recycle_cursor;
T_POWER_NODE_COMPONENT node_pool[node_cursor-1];
int32 node_recycle[node_recycle_cursor];
int32 consumer_capacity;
int32 consumer_cursor;
int32 consumer_recycle_cursor;
T_POWER_CONSUMER_COMPONENT consumer_pool[consumer_cursor-1];
int32 consumer_recycle[consumer_recycle_cursor];
int32 accumulator_capacity;
int32 acc_cursor;
int32 acc_recycle_cursor;
T_POWER_ACCUMULATOR_COMPONENT acc_pool[acc_cursor-1];
int32 acc_recycle[acc_recycle_cursor];
int32 exchanger_capacity;
int32 exc_cursor;
int32 exc_recycle_cursor;
T_POWER_EXCHANGER_COMPONENT exc_pool[exc_cursor-1];
int32 exc_recycle[exc_recycle_cursor];
int32 network_capacity;
int32 net_cursor;
int32 net_recycle_cursor;
local int32 i;
for (i = 0; i < net_cursor; i++) {
int32 net_pool_is_present;
if (is_present == 1) {
T_POWER_NETWORK net_pool;
}
}
int32 net_recycle[net_recycle_cursor];
} T_POWER_SYSTEM <optimize=false>;
typedef enum <int32> {
T_E_MINER_TYPE_None,
T_E_MINER_TYPE_Water,
T_E_MINER_TYPE_Vein,
T_E_MINER_TYPE_Oil
} T_E_MINER_TYPE;
typedef enum <int32> {
T_E_WORK_STATE_Idle,
T_E_WORK_STATE_Running,
T_E_WORK_STATE_Outputing,
T_E_WORK_STATE_Lack = -1,
T_E_WORK_STATE_Full = -2
} T_E_WORK_STATE;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 pc_id;
T_E_MINER_TYPE type;
int32 speed;
int32 time;
int32 period;
int32 insert_target;
T_E_WORK_STATE work_state;
int32 vein_count;
if (vein_count > 0)
{
int32 veins[vein_count];
}
int32 currentVeinIndex;
int32 minimumVeinAmount;
int32 product_id;
int32 product_count;
uint32 seed;
} T_MINER_COMPONENT <optimize=false>;
typedef enum <int32> {
T_E_INSERTER_STAGE_Picking,
T_E_INSERTER_STAGE_Sending,
T_E_INSERTER_STAGE_Inserting,
T_E_INSERTER_STAGE_Returning
} T_E_INSERTER_STAGE;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 pc_id;
T_E_INSERTER_STAGE stage;
int32 speed;
int32 time;
int32 stt;
int32 delay;
int32 pick_target;
int32 insert_target;
bool care_needs;
bool can_stack;
int16 pick_offset;
int16 insert_offset;
int32 filter;
int32 item_id;
int32 stack_count;
int32 stack_size;
T_VEC_SINGLE pos2;
T_QUATERNION rot2;
int16 t1;
int16 t2;
} T_INSERTER_COMPONENT;
typedef enum <int32> {
T_E_RECIPE_TYPE_None,
T_E_RECIPE_TYPE_Smelt,
T_E_RECIPE_TYPE_Chemical,
T_E_RECIPE_TYPE_Refine,
T_E_RECIPE_TYPE_Assemble,
T_E_RECIPE_TYPE_Particle,
T_E_RECIPE_TYPE_Exchange,
T_E_RECIPE_TYPE_PhotonStore,
T_E_RECIPE_TYPE_Fractionate,
T_E_RECIPE_TYPE_Research = 15
} T_E_RECIPE_TYPE;
typedef struct {
int32 version;
int32 id;
int32 entity_id;
int32 pc_id;
bool replicating;
bool outputing;
int32 speed;
int32 time;
int32 recipe_id;
if (recipe_id > 0) {
T_E_RECIPE_TYPE recipe_type;
int32 time_spend;
int32 requires_len;
int32 requires[requires_len];
int32 requires_counts_len;
int32 requires_counts[requires_counts_len];