-
Notifications
You must be signed in to change notification settings - Fork 81
/
df.buildings.xml
1413 lines (1256 loc) · 60.6 KB
/
df.buildings.xml
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
<data-definition>
<enum-type type-name='building_type'> bay12: BuildingType
<enum-attr name='name' use-key-name='true'/>
<enum-attr name='classname'/>
<enum-item name="NONE" value='-1'/>
<enum-item name="Chair">
<item-attr name='classname' value='building_chairst'/>
</enum-item>
<enum-item name="Bed">
<item-attr name='classname' value='building_bedst'/>
</enum-item>
<enum-item name="Table">
<item-attr name='classname' value='building_tablest'/>
</enum-item>
<enum-item name="Coffin">
<item-attr name='classname' value='building_coffinst'/>
</enum-item>
<enum-item name="FarmPlot">
<item-attr name='name' value='Farm Plot'/>
<item-attr name='classname' value='building_farmplotst'/>
</enum-item>
<enum-item name="Furnace">
<item-attr name='classname' value='building_furnacest'/>
</enum-item>
<enum-item name="TradeDepot">
<item-attr name='name' value='Trade Depot'/>
<item-attr name='classname' value='building_tradedepotst'/>
</enum-item>
<enum-item name="Shop">
<item-attr name='classname' value='building_shopst'/>
</enum-item>
<enum-item name="Door">
<item-attr name='classname' value='building_doorst'/>
</enum-item>
<enum-item name="Floodgate">
<item-attr name='classname' value='building_floodgatest'/>
</enum-item>
<enum-item name="Box">
<item-attr name='classname' value='building_boxst'/>
</enum-item>
<enum-item name="Weaponrack">
<item-attr name='name' value='Weapon Rack'/>
<item-attr name='classname' value='building_weaponrackst'/>
</enum-item>
<enum-item name="Armorstand">
<item-attr name='name' value='Armor Stand'/>
<item-attr name='classname' value='building_armorstandst'/>
</enum-item>
<enum-item name="Workshop">
<item-attr name='classname' value='building_workshopst'/>
</enum-item>
<enum-item name="Cabinet">
<item-attr name='classname' value='building_cabinetst'/>
</enum-item>
<enum-item name="Statue">
<item-attr name='classname' value='building_statuest'/>
</enum-item>
<enum-item name="WindowGlass">
<item-attr name='name' value='Glass Window'/>
<item-attr name='classname' value='building_window_glassst'/>
</enum-item>
<enum-item name="WindowGem">
<item-attr name='name' value='Gem Window'/>
<item-attr name='classname' value='building_window_gemst'/>
</enum-item>
<enum-item name="Well">
<item-attr name='classname' value='building_wellst'/>
</enum-item>
<enum-item name="Bridge">
<item-attr name='classname' value='building_bridgest'/>
</enum-item>
<enum-item name="RoadDirt">
<item-attr name='name' value='Dirt Road'/>
<item-attr name='classname' value='building_road_dirtst'/>
</enum-item>
<enum-item name="RoadPaved">
<item-attr name='name' value='Paved Road'/>
<item-attr name='classname' value='building_road_pavedst'/>
</enum-item>
<enum-item name="SiegeEngine">
<item-attr name='name' value='Siege Engine'/>
<item-attr name='classname' value='building_siegeenginest'/>
</enum-item>
<enum-item name="Trap">
<item-attr name='classname' value='building_trapst'/>
</enum-item>
<enum-item name="AnimalTrap">
<item-attr name='name' value='Animal Trap'/>
<item-attr name='classname' value='building_animaltrapst'/>
</enum-item>
<enum-item name="Support">
<item-attr name='classname' value='building_supportst'/>
</enum-item>
<enum-item name="ArcheryTarget">
<item-attr name='name' value='Archery Target'/>
<item-attr name='classname' value='building_archerytargetst'/>
</enum-item>
<enum-item name="Chain">
<item-attr name='classname' value='building_chainst'/>
</enum-item>
<enum-item name="Cage">
<item-attr name='classname' value='building_cagest'/>
</enum-item>
<enum-item name="Stockpile">
<item-attr name='classname' value='building_stockpilest'/>
</enum-item>
<enum-item name="Civzone">
<item-attr name='name' value='Zone'/>
<item-attr name='classname' value='building_civzonest'/>
</enum-item>
<enum-item name="Weapon">
<item-attr name='classname' value='building_weaponst'/>
</enum-item>
<enum-item name="Wagon">
<item-attr name='classname' value='building_wagonst'/>
</enum-item>
<enum-item name="ScrewPump">
<item-attr name='name' value='Screw Pump'/>
<item-attr name='classname' value='building_screw_pumpst'/>
</enum-item>
<enum-item name="Construction">
<item-attr name='classname' value='building_constructionst'/>
</enum-item>
<enum-item name="Hatch">
<item-attr name='classname' value='building_hatchst'/>
</enum-item>
<enum-item name="GrateWall">
<item-attr name='name' value='Wall Grate'/>
<item-attr name='classname' value='building_grate_wallst'/>
</enum-item>
<enum-item name="GrateFloor">
<item-attr name='name' value='Floor Grate'/>
<item-attr name='classname' value='building_grate_floorst'/>
</enum-item>
<enum-item name="BarsVertical">
<item-attr name='name' value='Vertical Bars'/>
<item-attr name='classname' value='building_bars_verticalst'/>
</enum-item>
<enum-item name="BarsFloor">
<item-attr name='name' value='Floor Bars'/>
<item-attr name='classname' value='building_bars_floorst'/>
</enum-item>
<enum-item name="GearAssembly">
<item-attr name='name' value='Gear Assembly'/>
<item-attr name='classname' value='building_gear_assemblyst'/>
</enum-item>
<enum-item name="AxleHorizontal">
<item-attr name='name' value='Horizontal Axle'/>
<item-attr name='classname' value='building_axle_horizontalst'/>
</enum-item>
<enum-item name="AxleVertical">
<item-attr name='name' value='Vertical Axle'/>
<item-attr name='classname' value='building_axle_verticalst'/>
</enum-item>
<enum-item name="WaterWheel">
<item-attr name='name' value='Water Wheel'/>
<item-attr name='classname' value='building_water_wheelst'/>
</enum-item>
<enum-item name="Windmill">
<item-attr name='classname' value='building_windmillst'/>
</enum-item>
<enum-item name="TractionBench">
<item-attr name='name' value='Traction Bench'/>
<item-attr name='classname' value='building_traction_benchst'/>
</enum-item>
<enum-item name="Slab">
<item-attr name='classname' value='building_slabst'/>
</enum-item>
<enum-item name="Nest">
<item-attr name='classname' value='building_nestst'/>
</enum-item>
<enum-item name="NestBox">
<item-attr name='name' value='Nest Box'/>
<item-attr name='classname' value='building_nest_boxst'/>
</enum-item>
<enum-item name="Hive">
<item-attr name='classname' value='building_hivest'/>
</enum-item>
<enum-item name="Rollers">
<item-attr name='classname' value='building_rollersst'/>
</enum-item>
<enum-item name="Instrument">
<item-attr name='classname' value='building_instrumentst'/>
</enum-item>
<enum-item name="Bookcase">
<item-attr name='classname' value='building_bookcasest'/>
</enum-item>
<enum-item name="DisplayFurniture">
<item-attr name='name' value='Display Furniture'/>
<item-attr name='classname' value='building_display_furniturest'/>
</enum-item>
<enum-item name="OfferingPlace">
<item-attr name='name' value='Offering Place'/>
<item-attr name='classname' value='building_offering_placest'/>
</enum-item>
</enum-type>
<bitfield-type type-name='building_flags'> bay12: BUILDINGFLAG_*
<flag-bit name='exists' comment='actually built, not just ordered'/>
<flag-bit name='site_blocked' comment='items on ground on site'/>
<flag-bit name='room_collision' comment='major intersection with another room?'/>
<flag-bit name='mastering_pile'/>
<flag-bit name='almost_deleted' comment='when requesting delete while in_update'/>
<flag-bit name='in_update' comment='skip_finalize_blast'/>
<flag-bit name='from_worldgen' comment='do_not_retain_in_creation_zone'/>
<flag-bit name='did_location_value'/>
</bitfield-type>
<bitfield-type type-name='door_flags' base-type='uint16_t'> bay12: BUILDINGFLAG_DOOR_*, BUILDINGFLAG_HATCH_*
<flag-bit name='forbidden'/>
<flag-bit name='unused_02'/>
<flag-bit name='taken_by_invaders'/>
<flag-bit name='used_by_intruder'/>
<flag-bit name='closed'/>
<flag-bit name='operated_by_mechanisms'/>
</bitfield-type>
<bitfield-type type-name='gate_flags' base-type='uint16_t'>bay12: BUILDINGFLAG_BRIDGE_*, BUILDINGFLAG_FLOODGATE_*, BUILDINGFLAG_GRATE_WALL_*, BUILDINGFLAG_GRATE_FLOOR_*, BUILDINGFLAG_BARS_VERTICAL_*, BUILDINGFLAG_BARS_FLOOR_*
<flag-bit name='closed'/>
<flag-bit name='closing'/>
<flag-bit name='opening'/>
<flag-bit name='collapsing' comment='bridge only'/>
<flag-bit name='has_support' comment='bridge only'/>
</bitfield-type>
<enum-type type-name='building_extents_type' base-type='int8_t'> bay12: ???
<enum-item name='None' value='0'/>
<enum-item name='Stockpile'/>
<enum-item name='Wall'/>
<enum-item name='Interior'/>
<enum-item name='DistanceBoundary'/>
</enum-type>
<struct-type type-name='building_extents' comment='not actually a real structure'>
<pointer name='extents' is-array='true'>
<enum type-name='building_extents_type'/>
</pointer>
<int32_t name='x'/>
<int32_t name='y'/>
<int32_t name='width'/>
<int32_t name='height'/>
</struct-type>
<struct-type type-name='building_drawbuffer' original-name='building_printinfost'>
<static-array name='signpost_texpos' type-name='int32_t' count='31'/>
<static-array name='building_one_texpos' count='31'>
<static-array count='31' type-name='int32_t'/>
</static-array>
<static-array name='item_texpos' count='31'>
<static-array count='31' type-name='int32_t'/>
</static-array>
<static-array name='building_two_texpos' count='31'>
<static-array count='31' type-name='int32_t'/>
</static-array>
<static-array name='tile' count='31'>
<static-array count='31' type-name='uint8_t'/>
</static-array>
<static-array name='fore' count='31'>
<static-array count='31' type-name='int8_t'/>
</static-array>
<static-array name='back' count='31'>
<static-array count='31' type-name='int8_t'/>
</static-array>
<static-array name='bright' count='31'>
<static-array count='31' type-name='int8_t'/>
</static-array>
<int16_t name='x1'/>
<int16_t name='x2'/>
<int16_t name='y1'/>
<int16_t name='y2'/>
</struct-type>
<class-type type-name='building' original-name='buildingst'
instance-vector='$global.world.buildings.all' key-field='id'>
<int32_t name='x1' comment='top left'/>
<int32_t name='y1'/>
<int32_t name='centerx' comment='work location'/>
<int32_t name='x2' comment='bottom right'/>
<int32_t name='y2'/>
<int32_t name='centery'/>
<int32_t name='z'/>
<bitfield name='flags' type-name='building_flags'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index' init-value='-1'/>
<compound name='room' type-name='building_extents' comment='not a compound in bay12'/>
<int32_t name='age'/>
<int16_t name='race' ref-target='creature_raw'/>
<int32_t name='id' init-value='-1'/>
<stl-vector name='jobs' pointer-type='job'/>
<stl-vector name='specific_refs' pointer-type='specific_ref'/>
<stl-vector name='general_refs' pointer-type='general_ref'/>
<stl-vector name='relations' pointer-type='building_civzonest' comment='zone(s) this building is in; **not sorted**'/>
<stl-vector name='job_claim_suppress' comment='after Remv Cre, prevents unit from taking jobs at building'>
<pointer> bay12: job_restrictionst
<pointer name='unit' type-name='unit'/>
<int32_t name='timer'/>
</pointer>
</stl-vector>
<stl-string name='name'/>
<stl-vector name='activities'>
<pointer> bay12: building_activity_infost
<int32_t name='activity_id' ref-target='activity_entry'/>
<int32_t name='event_id' ref-target='activity_event' aux-value='$$.activity_id'/>
</pointer>
</stl-vector>
<int32_t name='world_data_id' ref-target='world_object_data' since='v0.34.01' comment='creation_zone_id'/>
<int32_t name='world_data_subid' init-value='-1' since='v0.34.01' comment='creation_zone_alt_id'/>
<int32_t name='creation_bld_num' init-value='-1' since='v0.40.01'/>
<int32_t name='site_id' ref-target='world_site' since='v0.42.01'/>
<int32_t name='location_id' ref-target='abstract_building' aux-value='$$.site_id' since='v0.42.01'/>
<virtual-methods>
<vmethod ret-type='int32_t' name='getCustomType'/>
<vmethod name='setCustomType'> <int32_t name='type'/> </vmethod>
<vmethod name='countHospitalSupplies'>
<pointer name='supplies' type-name='hospital_supplies'/>
</vmethod>
<vmethod name='getStockpileLinks'>
<ret-type><pointer type-name='stockpile_links'/></ret-type>
</vmethod>
<vmethod name='detachWorldData' comment='remove_as_creation_zone_alteration'/>
<vmethod ret-type='bool' name='canLinkToStockpile'
comment='used by the give to building ui of stockpile'/>
<vmethod name='getUsers'>
<ret-type><pointer type-name='building_users'/></ret-type>
</vmethod>
<vmethod name='moveBuilding'>
<int16_t name='delta_x'/>
<int16_t name='delta_y'/>
<int16_t name='delta_z'/>
</vmethod>
<vmethod name='initOccupancy'>
<int32_t name='abs_x'/> <int32_t name='abs_y'/>
</vmethod>
<vmethod name='setFillTimer'>
<enum base-type='int32_t' type-name='job_type'/>
<int16_t name='newoff'/>
</vmethod>
<vmethod ret-type='bool' name='isOnFire'/>
<vmethod ret-type='bool' name='isUnpowered' comment='from magma OR machine power'/>
<vmethod ret-type='bool' name='canCollapse' comment='safe_on_unfreeze_floor'/>
-- 14
<vmethod ret-type='tile_building_occ' name='getPassableOccupancy'/>
<vmethod ret-type='tile_building_occ' name='getImpassableOccupancy'/>
<vmethod ret-type='bool' name='isPowerSource' comment='check_down_for_frozen_machine_rect'/>
<vmethod name='updateFromWeather'/>
<vmethod name='updateTemperature'/>
<vmethod name='updateItems'/>
<vmethod name='updateTempFromTile'><uint16_t name='temp'/><bool name='main_turn'/><int32_t name='amp'/></vmethod>
<vmethod ret-type='bool' name='isNormalFurniture' comment='bay12: item_determines_building_pic'/>
<vmethod ret-type='bool' name='isFarmPlot' comment='destroy_not_topple'/>
<vmethod name='getWorkshopProfile'>
<ret-type><pointer type-name='workshop_profile'/></ret-type>
</vmethod>
-- 24
<vmethod name='getMachineInfo'>
<ret-type><pointer type-name='machine_info'/></ret-type>
</vmethod>
<vmethod name='getPowerInfo'>
<pointer name='power_info' type-name='power_info'/>
</vmethod>
<vmethod ret-type='bool' name='canConnectToMachine'>
<pointer type-name='machine_tile_set'/>
</vmethod>
<vmethod ret-type='building_type' name='getType'/>
<vmethod ret-type='int16_t' name='getSubtype'/>
<vmethod name='setSubtype'> <int16_t name='subtype'/> </vmethod>
<vmethod ret-type='bool' name='isActual'/>
<vmethod ret-type='bool' name='keepsOwnerAfterDeath'/>
<vmethod name='updateAction'/>
<vmethod ret-type='bool' name='isStatueOrRestraint' comment='owned_party_spot'/>
-- 34
<vmethod name='setMaterialAmount'> <int32_t name='amt'/> </vmethod>
<vmethod name='setBuildStage'> <int16_t name='stage'/> </vmethod>
<vmethod ret-type='int32_t' name='getBuildStage'/>
<vmethod ret-type='int32_t' name='getMaxBuildStage'/>
<vmethod ret-type='int32_t' name='getBuildDuration'/>
<vmethod ret-type='bool' name='isSettingOccupancy'/>
<vmethod ret-type='bool' name='trampleOnBuild'/>
<vmethod ret-type='bool' name='isExtentShaped'/>
<vmethod name='updateOccupancy'>
<int32_t name='abs_x'/> <int32_t name='abs_y'/>
</vmethod>
-- 44
<vmethod ret-type='int32_t' name='getPersonalValue'> <pointer type-name='unit'/> </vmethod>
<vmethod ret-type='bool' name='canBeRoom'/>
<vmethod ret-type='int32_t' name='getDestroyDuration'/>
<vmethod name='queueDestroy' comment='same as querying and pressing X'/>
<vmethod ret-type='bool' name='isImpassableTile'>
<int32_t name='rel_x'/> <int32_t name='rel_y'/>
</vmethod>
<vmethod ret-type='int32_t' name='getFreeCapacity'>
<bool name='subtract_pending_jobs'/>
</vmethod>
<vmethod ret-type='bool' name='canStoreItem'>
<pointer type-name='item'/> <bool name='subtract_pending_jobs'/>
</vmethod>
<vmethod name='getName'> <pointer type-name='stl-string' name='name'/> </vmethod>
<vmethod name='getNameColor'/>
<vmethod name='initFarmSeasons'/>
-- 54
<vmethod ret-type='int32_t' name='getClutterLevel' comment='1..10'/>
<vmethod ret-type='bool' name='needsDesign'/>
<vmethod ret-type='bool' name='canUseForMood'>
<enum base-type='int16_t' type-name='job_type'/>
</vmethod>
<vmethod ret-type='bool' name='canBeRoomSubset'/>
<vmethod ret-type='bool' name='isCoffin' comment='bay12: uniqueownablebuilding, cannot have more than one room'/>
<vmethod ret-type='bool' name='canUseSpouseRoom'/>
<vmethod ret-type='bool' name='canMakeRoom' comment='false if already, or cannot be'/>
<vmethod ret-type='bool' name='isAssigned' comment='building is assigned to a unit (if a zone) or is in a zone that is assigned to a unit'/>
-- 64
<vmethod ret-type='bool' name='isJusticeRestraint'/>
<vmethod name='detachRestrainedUnit'> <pointer type-name='unit'/> </vmethod>
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod ret-type='bool' name='isImpassableAtCreation'
comment='bay12: perimdestroyer; the true set looks like things where the unit should stand aside'/>
<vmethod name='categorize' comment='Add to world.buildings.other.*'> <bool name='in_play'/> </vmethod>
<vmethod name='uncategorize' comment='Remove from world.buildings.other.*'/>
<vmethod ret-type='int32_t' name='getArchValue'/>
<vmethod name='setTriggerState'> <int32_t name='new_state' comment='0 = active/open, 1 = inactive/closed'/> </vmethod>
-- 74
<vmethod ret-type='bool' name='needsMagma'/>
<vmethod name='removeUses'> <bool name='noscatter'/> <bool name='lost'/> </vmethod>
<vmethod name='deconstructItems'> <bool name='noscatter'/> <bool name='lost'/> <bool name='from_damage'/> </vmethod>
<vmethod name='cleanupMap'/>
<vmethod ret-type='bool' name='isFireSafe' comment='checks contained_items[0] for FIREIMMUNE'><int8_t name='fire_type'/></vmethod>
<vmethod name='fillSidebarMenu'/>
<vmethod ret-type='bool' name='isForbidden'/>
<vmethod ret-type='bool' name='isInvisibleToPlayer'/>
<vmethod ret-type='bool' name='isHidden'/>
-- 85
<vmethod ret-type='bool' name='isVisibleInUI'
comment='not hidden, or hide/unhide UI mode'/>
<vmethod ret-type='bool' name='isVisibleInViewport' comment='checks coordinates, calls isVisibleInUI and checks window_xy'>
<pointer name='viewport' type-name='map_viewport'/>
</vmethod>
<vmethod name='getDrawExtents'>
<pointer name='buffer' type-name='building_drawbuffer'/>
</vmethod>
<vmethod name='drawBuilding'>
<uint32_t name='curtick'/>
<pointer name='buffer' type-name='building_drawbuffer'/>
<int16_t name='z_offset' comment='building_wellst only'/>
</vmethod>
<vmethod name='isValidSquadAssignment' ret-type='bool'>
<int32_t name='squad_id'/>
<uint32_t name='force_flag'/>
</vmethod>
<vmethod name='getSpecificSquad' ret-type='int32_t'/>
<vmethod name='getSpecificPosition' ret-type='int32_t'/>
<vmethod name='setSpecificSquadPos'><int32_t name='squad_id'/><int32_t name='squad_pos'/></vmethod>
<vmethod name='clearSpecificSquad'/>
<vmethod name='removeLocationInfo' since='v0.42.01' comment='related to tavern beds'/>
-- 95
<vmethod is-destructor='true'/>
</virtual-methods>
</class-type>
-- stockpile --
<struct-type type-name='stockpile_links' original-name='stockpile_link_infost'>
<stl-vector name='give_to_pile' pointer-type='building'/>
<stl-vector name='take_from_pile' pointer-type='building'/>
<stl-vector name='give_to_workshop' pointer-type='building'/>
<stl-vector name='take_from_workshop' pointer-type='building'/>
</struct-type>
<class-type type-name='building_stockpilest' inherits-from='building'>
<compound type-name='stockpile_settings' name='settings'/>
<!-- <compound name='storage' comment='stockpile_storage_infost'> -->
<int16_t name='max_barrels'/>
<int16_t name='max_bins'/>
<int16_t name='max_wheelbarrows'/>
<stl-vector name='container_type'>
<enum base-type='int16_t' type-name='item_type'/>
</stl-vector>
<stl-vector name='container_item_id' type-name='int32_t' ref-target='item'/>
<stl-vector name='container_x' type-name='int16_t'/>
<stl-vector name='container_y' type-name='int16_t'/>
<!-- </compound> -->
<compound name='links' type-name='stockpile_links'/>
<bitfield name='stockpile_flag' base-type='uint32_t'> bay12: BUILDINGFLAG_STOCKPILE_FLAG_*
<flag-bit name='use_links_only'/>
</bitfield>
<int32_t name='stockpile_number' init-value='-1'/>
<stl-vector name='linked_stops' pointer-type='hauling_stop'/>
</class-type>
-- zone --
<struct-type type-name='hospital_supplies' original-name='location_infost'>
<bitfield name='supplies_needed' base-type='uint32_t'> bay12: LOCATION_INFO_FLAG_*
<flag-bit name='goblets'/>
<flag-bit name='instruments'/>
<flag-bit name='paper'/>
<flag-bit name='entity_recognized' comment='not actually a Need'/>
<flag-bit name='splints'/>
<flag-bit name='thread'/>
<flag-bit name='cloth'/>
<flag-bit name='crutches'/>
<flag-bit name='plaster'/>
<flag-bit name='buckets'/>
<flag-bit name='soap'/>
</bitfield>
<enum name='dedicated_unit_type' type-name='profession'/>
<int32_t name='max_goblets'/>
<int32_t name='max_instruments'/>
<int32_t name='max_paper'/>
<int32_t name='max_splints' init-value='5'/>
<int32_t name='max_thread' init-value='75000'/>
<int32_t name='max_cloth' init-value='50000'/>
<int32_t name='max_crutches' init-value='5'/>
<int32_t name='max_plaster' init-value='750'/>
<int32_t name='max_buckets' init-value='2'/>
<int32_t name='max_soap' init-value='750'/>
<int32_t name='max_book_copies' init-value='2'/>
<int32_t name='cur_level'/>
<int32_t name='last_value'/>
<int32_t name='cur_goblets'/>
<int32_t name='cur_instruments'/>
<int32_t name='cur_paper'/>
<int32_t name='cur_splints'/>
<int32_t name='cur_thread'/>
<int32_t name='cur_cloth'/>
<int32_t name='cur_crutches'/>
<int32_t name='cur_plaster'/>
<int32_t name='cur_buckets'/>
<int32_t name='cur_soap'/>
<int32_t name='supply_recheck_timer'/>
<int32_t name='major_update_count'/>
<stl-vector name='zone_bld' type-name='int32_t' ref-target='building'/>
</struct-type>
<enum-type type-name='civzone_type' base-type='int32_t'> bay12: BuildingCivzoneType
<enum-item name="Home"/>
<enum-item name="Depot"/>
<enum-item name="Stockpile"/>
<enum-item name="NobleQuarters"/>
<enum-item/> Invalid Type
<enum-item/> Invalid Type
<enum-item/> Invalid Type
<enum-item name="MeadHall"/>
<enum-item name="ThroneRoom"/>
<enum-item/> formerly ActivityZone
<enum-item name="Temple"/>
<enum-item name="Kitchen"/>
<enum-item name="CaptiveRoom"/>
<enum-item name="TowerTop"/>
<enum-item name="Courtyard"/>
<enum-item name="Treasury"/>
<enum-item name="GuardPost"/>
<enum-item name="Entrance"/>
<enum-item name="SecretLibrary"/>
<enum-item name="Library"/>
<enum-item name="Plot"/>
<enum-item name="MarketStall"/>
<enum-item name='RoadCenter'/>
<enum-item name='Campground'/>
<enum-item name='CommandTent'/>
<enum-item name='Tent'/>
<enum-item name='CommandTentBld'/>
<enum-item name='TentBld'/>
<enum-item name='MechanismRoom'/>
<enum-item name='DungeonCell'/>
<enum-item name='AnimalPit'/>
<enum-item name='ClothPit'/>
<enum-item name='TanningPit'/>
<enum-item name='ClothClothingPit'/>
<enum-item name='LeatherClothingPit'/>
<enum-item name='BoneCarvingPit'/>
<enum-item name='GemCuttingPit'/>
<enum-item name='WeaponsmithingPit'/>
<enum-item name='BowmakingPit'/>
<enum-item name='BlacksmithingPit'/>
<enum-item name='ArmorsmithingPit'/>
<enum-item name='MetalCraftingPit'/>
<enum-item name='LeatherworkingPit'/>
<enum-item name='CarpentryPit'/>
<enum-item name='StoneworkingPit'/>
<enum-item name='ForgingPit'/>
<enum-item name='FightingPit'/>
<enum-item name='Well'/>
<enum-item name='RoadExitNorth'/>
<enum-item name='RoadExitSouth'/>
<enum-item name='RoadExitEast'/>
<enum-item name='RoadExitWest'/>
<enum-item name='TunnelCenter'/>
<enum-item name='AnimalWorkshop'/>
<enum-item name='ClothWorkshop'/>
<enum-item name='TanningWorkshop'/>
<enum-item name='ClothClothingWorkshop'/>
<enum-item name='LeatherClothingWorkshop'/>
<enum-item name='BoneCarvingWorkshop'/>
<enum-item name='GemCuttingWorkshop'/>
<enum-item name='WeaponsmithingWorkshop'/>
<enum-item name='BowmakingWorkshop'/>
<enum-item name='BlacksmithingWorkshop'/>
<enum-item name='ArmorsmithingWorkshop'/>
<enum-item name='MetalCraftingWorkshop'/>
<enum-item name='LeatherworkingShop'/>
<enum-item name='CarpentryWorkshop'/>
<enum-item name='StoneworkingWorkshop'/>
<enum-item name='ForgingWorkshop'/>
<enum-item name='CountingHouseOffices'/>
<enum-item name='CountingHouseStorage'/>
<enum-item name='GuildhallOffices'/>
<enum-item name='GuildhallStorage'/>
<enum-item name='TowerEntrance'/>
<enum-item name='TowerFeasthall'/>
<enum-item name='TowerBedroom'/>
<enum-item name='TowerTreasury'/>
<enum-item name='TowerDungeon'/>
<enum-item name='TowerAttic'/>
<enum-item name='Dormitory'/>
<enum-item name='DiningHall'/>
<enum-item name='Shrine'/>
<enum-item name='WaterSource'/>
<enum-item name='Dump'/>
<enum-item name='SandCollection'/>
<enum-item name='FishingArea'/>
<enum-item name='Pond'/>
<enum-item name='MeetingHall'/>
<enum-item name='Pen'/>
<enum-item name='ClayCollection'/>
<enum-item name='AnimalTraining'/>
<enum-item name='PlantGathering'/>
<enum-item name='Bedroom'/>
<enum-item name='Office'/>
<enum-item name='ArcheryRange'/>
<enum-item name='Barracks'/>
<enum-item name='Dungeon'/>
<enum-item name='Tomb'/>
</enum-type>
<class-type type-name='building_civzonest' inherits-from='building'>
<stl-vector name='assigned_units' type-name='int32_t' ref-target='unit'/>
<stl-vector name='assigned_items' type-name='int32_t' ref-target='item'/>
<enum base-type='int32_t' name="type" type-name='civzone_type' comment='only saved as int16'/>
<bitfield name='spec_sub_flag' base-type='uint32_t'> bay12: CIVZONE_ACTIVITY_FLAG_*
<flag-bit name='unused_01'/>
<flag-bit name='unused_02'/>
<flag-bit name='unused_03'/>
<flag-bit name='active'/>
<flag-bit name='unused_05'/>
<flag-bit name='unused_06'/>
<flag-bit name='unused_07'/>
<flag-bit name='unused_08'/>
<flag-bit name='unused_09'/>
<flag-bit name='unused_10'/>
<flag-bit name='unused_11'/>
<flag-bit name='unused_12'/>
</bitfield>
<int32_t name='site_realization_building_id'/>
<int32_t name='site_realization_sul_id'/>
<int32_t name='zone_num'/>
<compound name='zone_settings' is-union='true'>
<compound name='whole'>
<int32_t name='i1'/>
<int32_t name='i2'/>
</compound>
<compound name='gather'>
<bitfield name='flags' base-type='uint32_t'> bay12: CIVZONE_GATHER_FLAG_*
<flag-bit name='pick_trees'/>
<flag-bit name='pick_shrubs'/>
<flag-bit name='gather_fallen'/>
</bitfield>
<int32_t name='timer'/>
</compound>
<bitfield name='pen' base-type='uint32_t'> bay12: CIVZONE_PEN_FLAG_*
<flag-bit name='check_occupants'/>
</bitfield>
<bitfield name='tomb' base-type='uint32_t'> bay12: CIVZONE_TOMB_FLAG_*
<flag-bit name='no_pets'/>
<flag-bit name='no_citizens'/>
</bitfield>
<compound name='archery'>
<int32_t name='dir_x'/>
<int32_t name='dir_y'/>
</compound>
<compound name='pond'>
<bitfield name='flag' base-type='uint32_t'> bay12: CIVZONE_POND_FLAG_*
<flag-bit name='keep_filled'/>
<flag-bit name='check_occupants'/>
</bitfield>
<int16_t name='fill_timer'/>
</compound>
</compound>
<stl-vector name='home_general_hf' type-name='int32_t' ref-target='historical_figure'/>
<stl-vector name='contained_buildings' pointer-type='building' comment='includes eg workshops and beds; **not sorted**'/>
<int32_t name='assigned_unit_id' ref-target='unit'/>
<pointer name='assigned_unit' type-name='unit'/>
<stl-vector name='squad_room_info'>
<pointer> bay12: building_squad_infost
<int32_t name='squad_id' comment='or global id, inside a union'/>
<bitfield name='mode' type-name='squad_use_flags'/>
</pointer>
</stl-vector>
<int32_t name='retained_owner' ref-target='unit' comment='only used during save'/>
</class-type>
-- actual --
<enum-type type-name='building_item_role_type' base-type='int16_t' comment='bay12: BuildingItemRoles'>
<enum-item name='TEMP'/>
<enum-item name='TEMP_PRINTHIDDEN'/>
<enum-item name='PERM'/>
</enum-type>
<class-type type-name='building_actual' inherits-from='building'
original-name='building_actualst'>
<int16_t name='construction_stage'
comment='0 not started, then 1 or 3 max depending on type'/>
<stl-vector name='contained_items'>
<pointer> bay12: buildingitemst
<pointer name='item' type-name='item'/>
<enum name='use_mode' type-name='building_item_role_type' comment='bay12: role'/>
</pointer>
</stl-vector>
<pointer name='design' type-name='building_design'/>
<virtual-methods>
<vmethod ret-type='bool' name='isDestroyedByItemRemoval'/>
<vmethod ret-type='bool' comment='default false'/>
<vmethod ret-type='bool' comment='default false'/>
</virtual-methods>
</class-type>
<struct-type type-name='building_design' original-name='building_archinfost'>
<int32_t name='builder1' ref-target='historical_figure'/>
<int32_t name='builder1_civ' ref-target='historical_entity'/>
<int16_t name='build_skill'/>
<int16_t name='build_timer1' comment='+1 per 10 frames while building'/>
<int32_t name='builder2' ref-target='historical_figure'/>
<int16_t name='build_timer2'/>
<enum base-type='int16_t' name='quality1' type-name='item_quality'/>
<bitfield name='flags' base-type='uint32_t'> bay12: BUILDING_ARCHFLAG_*
<flag-bit name='rough' comment='rough gabbro road'/>
<flag-bit name='built'/>
</bitfield>
<int32_t name='hitpoints'/>
<int32_t name='max_hitpoints'/>
</struct-type>
-- workshops --
<enum-type type-name='furnace_type' base-type='int16_t'>bay12: BuildingFurnaceType
<enum-attr name='name' use-key-name='true'/>
<enum-item name="WoodFurnace">
<item-attr name='name' value='Wood Furnace'/>
</enum-item>
<enum-item name="Smelter"/>
<enum-item name="GlassFurnace">
<item-attr name='name' value='Glass Furnace'/>
</enum-item>
<enum-item name="Kiln"/>
<enum-item name="MagmaSmelter">
<item-attr name='name' value='Magma Smelter'/>
</enum-item>
<enum-item name="MagmaGlassFurnace">
<item-attr name='name' value='Magma Glass Furnace'/>
</enum-item>
<enum-item name="MagmaKiln">
<item-attr name='name' value='Magma Kiln'/>
</enum-item>
<enum-item name="Custom">
<item-attr name='name' value='Custom Furnace'/>
</enum-item>
</enum-type>
<class-type type-name='building_furnacest' inherits-from='building_actual'>
<stl-vector name='melt_remainder' type-name='int32_t'
index-refers-to='(material-by-id 0 $)'/>
<uint16_t name="furnace_flag" comment='unused'/>
<enum base-type='int16_t' name="type" type-name='furnace_type'/>
<compound name='profile' type-name='workshop_profile'/>
<int32_t name="custom_type" ref-target='building_def'/>
</class-type>
<enum-type type-name='workshop_type' base-type='int16_t'> bay12: BuildingWorkshopType
<enum-attr name='name' use-key-name='true'/>
<enum-item name="Carpenters">
<item-attr name='name' value="Carpenter's Workshop"/>
</enum-item>
<enum-item name="Farmers">
<item-attr name='name' value="Farmer's Workshop"/>
</enum-item>
<enum-item name="Masons">
<item-attr name='name' value="Mason's Workshop"/>
</enum-item>
<enum-item name="Craftsdwarfs">
<item-attr name='name' value="Craftsdwarf's Workshop"/>
</enum-item>
<enum-item name="Jewelers">
<item-attr name='name' value="Jeweler's Workshop"/>
</enum-item>
<enum-item name="MetalsmithsForge">
<item-attr name='name' value="Metalsmith's Forge"/>
</enum-item>
<enum-item name="MagmaForge">
<item-attr name='name' value="Magma Forge"/>
</enum-item>
<enum-item name="Bowyers">
<item-attr name='name' value="Bowyer's Workshop"/>
</enum-item>
<enum-item name="Mechanics">
<item-attr name='name' value="Mechanic's Workshop"/>
</enum-item>
<enum-item name="Siege">
<item-attr name='name' value="Siege Workshop"/>
</enum-item>
<enum-item name="Butchers">
<item-attr name='name' value="Butcher's Shop"/>
</enum-item>
<enum-item name="Leatherworks">
<item-attr name='name' value="Leather Works"/>
</enum-item>
<enum-item name="Tanners">
<item-attr name='name' value="Tanner's Shop"/>
</enum-item>
<enum-item name="Clothiers">
<item-attr name='name' value="Clothier's Shop"/>
</enum-item>
<enum-item name="Fishery"/>
<enum-item name="Still"/>
<enum-item name="Loom"/>
<enum-item name="Quern"/>
<enum-item name="Kennels"/>
<enum-item name="Kitchen"/>
<enum-item name="Ashery"/>
<enum-item name="Dyers">
<item-attr name='name' value="Dyer's Shop"/>
</enum-item>
<enum-item name="Millstone"/>
<enum-item name="Custom">
<item-attr name='name' value="Custom Workshop"/>
</enum-item>
<enum-item name="Tool"/>
</enum-type>
<struct-type type-name='workshop_profile' original-name='workshop_profilest'>
<stl-vector name='permitted_workers' type-name='int32_t' ref-target='unit'/>
<int32_t name='min_level'/>
<int32_t name='max_level' init-value='3000'/>
<compound name='links' type-name='stockpile_links'/>
<int32_t name='max_general_orders'/>
<bitfield name='flags' base-type='uint32_t'> bay12: WORKSHOP_PROFILE_FLAG_*
<flag-bit name='block_general_orders'/>
</bitfield>
<static-array name='blocked_labors' type-name='bool' count='94' index-enum='unit_labor'/>
</struct-type>
<class-type type-name='building_workshopst' inherits-from='building_actual'>
<enum base-type='int16_t' name="type" type-name='workshop_type'/>
<compound name='profile' type-name='workshop_profile'/>
<compound name='machine' type-name='machine_info'/>
<int32_t name="custom_type" ref-target='building_def'/>
</class-type>
-- misc --
<class-type type-name='building_animaltrapst' inherits-from='building_actual'>
<int16_t name='bait_type' init-value='-1'/>
<int16_t name='fill_timer'/>
</class-type>
<class-type type-name='building_archerytargetst' inherits-from='building_actual'/>
<class-type type-name='building_armorstandst' inherits-from='building_actual'>
<uint16_t name='stand_flag' comment='unused'/>
<int32_t name='specific_squad' ref-target='squad'/>
<int32_t name='specific_position' init-value='-1'/>
</class-type>
<class-type type-name='building_bars_verticalst' inherits-from='building_actual'>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>
<class-type type-name='building_bars_floorst' inherits-from='building_actual'>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
</class-type>
<enum-type type-name='building_use_type' base-type='int16_t'> bay12: BuildingUseType
<enum-item name="NONE" value='-1'/>
<enum-item name="SitForEat"/>
<enum-item name="PlaceFoodForEat"/>
<enum-item name="Sleep"/>
<enum-item name="Rest"/>
<enum-item name="BedCarry"/>
<enum-item name="Surgery"/>
<enum-item name="RestInTraction"/>
<enum-item name="SitForRead"/>
<enum-item name="SitForWrite"/>
<enum-item name="PlaceWritingMaterials"/>
</enum-type>
<struct-type type-name='building_users' original-name='building_use_infost'>
<stl-vector name='unit' type-name='int32_t' ref-target='unit'/>
<stl-vector name='mode' type-name='building_use_type'/>
</struct-type>
<class-type type-name='building_bedst' inherits-from='building_actual'>
<int32_t name='specific_squad' ref-target='squad'/>
<int32_t name='specific_position' init-value='-1'/>
<compound name='users' type-name='building_users'/>
</class-type>
<class-type type-name='building_bookcasest' inherits-from='building_actual'/>
<class-type type-name='building_boxst' inherits-from='building_actual'>
<uint16_t name='box_flag' comment='unused'/>
<int32_t name='specific_squad' ref-target='squad'/>
<int32_t name='specific_position' init-value='-1'/>
</class-type>
<class-type type-name='building_bridgest' inherits-from='building_actual'>
<bitfield name='gate_flags' type-name='gate_flags' init-value='1'/>
<int8_t name='timer'/>
<enum name='direction' base-type='int8_t'>
<enum-item name='Retracting' value='-1'/>
<enum-item name='Left'/>
<enum-item name='Right'/>
<enum-item name='Up'/>
<enum-item name='Down'/>
</enum>
<int32_t name='material_amount'/>
</class-type>
<class-type type-name='building_cabinetst' inherits-from='building_actual'>