forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdf.block.xml
431 lines (368 loc) · 18.1 KB
/
df.block.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
<data-definition>
-- Fake structure
<struct-type type-name='tile_bitmask' custom-methods='true' comment='not in DF, 16x16 bitmask'>
<static-array name='bits' count='16' type-name='uint16_t'/>
<custom-methods>
<cmethod name='clear'/>
<cmethod name='set_all'/>
<cmethod name='has_assignments'/>
</custom-methods>
</struct-type>
<bitfield-type type-name='block_flags' base-type='uint32_t'> bay12: BLOCKFLAG_*
<flag-bit name='designated' comment='for jobs etc'/>
<flag-bit name='update_temperature'/>
<flag-bit name='update_liquid'/>
<flag-bit name='update_liquid_twice'
comment='Protects UpdateLiquid from being cleared the first time.'/>
<flag-bit name='repath_on_freeze'
comment='reindex_pathfinding set and flag cleared if temperature below 10000'/>
<flag-bit name='repath_on_melt'
comment='reindex_pathfinding set and flag cleared if temperature above 10000'/>
<flag-bit name='has_aquifer'
comment='has at least one "water_table" designation flag'/>
<flag-bit name='check_aquifer'
comment='bay12: NEARBY_WATER_TABLE; has tiles that may get flooded by an adjacent aquifer'/>
<flag-bit name='may_have_item_spatter'/>
<flag-bit name='may_have_material_spatter' comment="usually mud"/>
<flag-bit name='has_magma_close'/>
<flag-bit name='has_magma_far'/>
<flag-bit name='mas_magma_low'/>
<flag-bit name='has_river_high'/>
<flag-bit name='has_river_medium'/>
<flag-bit name='has_river_low'/>
</bitfield-type>
<enum-type type-name='block_square_event_type' base-type='int16_t'> bay12: BlockSquareEventType
<enum-item name='mineral'/>
<enum-item name='frozen_liquid'/>
<enum-item name='world_construction'/>
<enum-item name='material_spatter'/>
<enum-item name='grass'/>
<enum-item name='spoor'/>
<enum-item name='item_spatter'/>
<enum-item name='designation_priority'/>
</enum-type>
<class-type type-name='block_square_event' original-name='block_square_eventst'>
<virtual-methods>
<vmethod ret-type='block_square_event_type' name='getType'/>
<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='isEmpty'/>
<vmethod is-destructor='true'/>
<vmethod name='checkTemperature'>
<int16_t name='x'/>
<int16_t name='y'/>
<uint16_t name='temperature'/>
</vmethod>
</virtual-methods>
</class-type>
<bitfield-type type-name='mineral_event_flag'> bay12: MINERAL_EVENT_FLAG_*
<flag-bit name='discovered'/>
<flag-bit name='cluster'/>
<flag-bit name='vein'/>
<flag-bit name='cluster_small'/>
<flag-bit name='cluster_one'/>
</bitfield-type>
<class-type type-name='block_square_event_mineralst' inherits-from='block_square_event' custom-methods='true'>
<int32_t name='inorganic_mat' ref-target='inorganic_raw'/>
<compound name='tile_bitmask' type-name='tile_bitmask'/>
<bitfield name='flags' base-type='uint32_t' type-name='mineral_event_flag'/>
<custom-methods>
<cmethod name='has_assignments'/>
</custom-methods>
</class-type>
<class-type type-name='block_square_event_frozen_liquidst' inherits-from='block_square_event'>
<static-array name='tiles' count='16'>
<static-array count='16'>
<enum base-type='uint16_t' type-name='tiletype'/>
</static-array>
</static-array>
<static-array name='liquid_type' count='16'>
<static-array count='16'>
<enum base-type='uint8_t' type-name='tile_liquid'/>
</static-array>
</static-array>
</class-type>
<class-type type-name='block_square_event_material_spatterst' inherits-from='block_square_event'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<enum name='mat_state' type-name='matter_state'/>
<static-array name='amount' count='16'>
<static-array count='16' type-name='uint8_t'/>
</static-array>
<uint16_t name='min_temperature'/>
<uint16_t name='max_temperature'/>
</class-type>
<bitfield-type type-name='item_spatter_flag' base-type='uint8_t'> bay12: BLOCK_SQUARE_EVENT_ITEM_SPATTER_FLAG_*
<flag-bit name='season_full_timer' count='3'/>
</bitfield-type>
<class-type type-name='block_square_event_item_spatterst' inherits-from='block_square_event'>
<enum name='item_type' type-name='item_type'/>
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
<int16_t name='mattype' ref-target='material' aux-value='$$.matindex'/>
<int32_t name='matindex'/>
<int32_t name='print_variant'/>
<static-array name='amount' count='16'>
<static-array count='16' type-name='int32_t'/>
</static-array>
<static-array name='flag' count='16'>
<static-array count='16' type-name='item_spatter_flag'/>
</static-array>
<uint16_t name='min_temperature'/>
<uint16_t name='max_temperature'/>
</class-type>
<class-type type-name='block_square_event_grassst' inherits-from='block_square_event'>
<int32_t name='plant_index' ref-target='plant_raw' />
<static-array name='amount' count='16'>
<static-array count='16' type-name='uint8_t'/>
</static-array>
</class-type>
<enum-type type-name='spoor_type' base-type='int8_t'> bay12: BSESpoorType, defined as uint8_t but that won't work here because of NONE
<enum-item name='NONE' value='-1'/>
<enum-item name='BROKEN_VEGETATION'/>
<enum-item name='HFID_COMBINEDCASTE_BP'/>
<enum-item name='ITEMT_ITEMST_ORIENT'/>
<enum-item name='MESS'/>
</enum-type>
<bitfield-type type-name='spoor_flag' base-type='uint16_t'> bay12: BSE_SPOOR_FLAG_*
<flag-bit name='present'/>
<flag-bit name='has_direction'/>
<flag-bit name='direction' count='3' type-name='spoor_flag_dir'/>
<flag-bit name='yours'/>
<flag-bit name='liquid_print'/>
<flag-bit name='level' count='2' type-name='spoor_flag_level'/>
</bitfield-type>
<enum-type type-name='spoor_flag_dir' base-type='uint16_t'> bay12: BSE_SPOOR_FLAG_DIR_*
<enum-item name='north'/>
<enum-item name='south'/>
<enum-item name='east'/>
<enum-item name='northeast'/>
<enum-item name='west'/>
<enum-item name='northwest'/>
<enum-item name='southeast'/>
<enum-item name='southwest'/>
</enum-type>
<enum-type type-name='spoor_flag_level' base-type='uint16_t'> bay12: BSE_SPOOR_FLAG_LEVEL_*
<enum-item name='normal'/>
<enum-item name='vague'/>
<enum-item name='light'/>
<enum-item name='heavy'/>
</enum-type>
<struct-type type-name='bse_spoor_datast'>
<bitfield name='flag' type-name='spoor_flag'/>
<enum name='type' type-name='spoor_type'/>
<int32_t name='id1'/>
<int32_t name='id2'/>
<int32_t name='id3'/>
</struct-type>
<struct-type type-name='block_square_event_spoor_infost'>
<static-array name='flags' count='16'>
<static-array count='16' type-name='spoor_flag'/>
</static-array>
<static-array name='type' count='16'>
<static-array count='16' type-name='spoor_type'/>
</static-array>
<static-array name='id1' count='16'>
<static-array count='16' type-name='int32_t'/>
</static-array>
<static-array name='race' count='16' comment='bay12: id2, varies based on type'>
<static-array count='16'>
<int32_t ref-target='creature_raw'/>
</static-array>
</static-array>
<static-array name='caste' count='16' comment='bay12: id3, varies based on type'>
<static-array count='16'>
<int32_t ref-target='caste_raw'/>
</static-array>
</static-array>
<static-array name='age' count='16' comment='in half-seconds'>
<static-array count='16' type-name='int32_t'/>
</static-array>
<int32_t name='year' init-value='-1'/>
<int32_t name='year_tick' init-value='-1'/>
</struct-type>
<class-type type-name='block_square_event_spoorst' inherits-from='block_square_event'>
<compound name='info' type-name='block_square_event_spoor_infost'/>
</class-type>
<class-type type-name='block_square_event_world_constructionst' inherits-from='block_square_event'>
<int32_t name='construction_id' ref-target='world_construction'/>
<compound name='tile_bitmask' type-name='tile_bitmask'/>
</class-type>
<class-type type-name='block_square_event_designation_priorityst' inherits-from='block_square_event'>
<static-array name='priority' count='16'>
<static-array count='16' type-name='int32_t'/>
</static-array>
</class-type>
<df-linked-list-type type-name='block_burrow_link' item-type='block_burrow'/> bay12: tlink{burrow_blockst}
<struct-type type-name='block_burrow' original-name='burrow_blockst' df-list-link-type='block_burrow_link' df-list-link-field='link' custom-methods='true'>
<int32_t name='id' ref-target='burrow'/>
<compound name='tile_bitmask' type-name='tile_bitmask'/>
<pointer name="link" type-name='block_burrow_link'/>
<custom-methods>
<cmethod name='has_assignments'/>
</custom-methods>
</struct-type>
<struct-type type-name='map_block' original-name='blockst'>
<bitfield name='flags' type-name='block_flags'/>
<stl-vector name='block_events' pointer-type='block_square_event'/>
<df-linked-list name='block_burrows' type-name='block_burrow_link'/>
<int32_t name='local_feature' init-value='-1' comment='index into world_data.region_map'/>
<int32_t name='global_feature' ref-target='world_underground_region'/>
<int32_t name='global_feature_sq' init-value='-1'/>
This is compared to unit.animal.population.depth when a revealed
necromancer searches for a map edge tile to run away to:
<int16_t name='layer_depth' comment='uninitialized'/>
<int32_t name='dsgn_check_cooldown'/>
<bitfield type-name='tile_designation' name='default_liquid'/>
<stl-vector name='items' type-name='int32_t' ref-target='item'/>
<stl-vector name='flows' pointer-type='flow_info'/>
<compound name='flow_pool' type-name='flow_reuse_pool' comment='actually inline'/>
<compound name='map_pos' type-name='coord'/>
<compound name='region_pos' type-name='coord2d'/>
<static-array name='tiletype' count='16'>
<static-array count='16'>
<enum base-type='uint16_t' type-name='tiletype' init-value='OpenSpace'/>
</static-array>
</static-array>
<static-array name='designation' count='16'>
<static-array count='16'>
<bitfield type-name='tile_designation' base-type='uint32_t'/>
</static-array>
</static-array>
<static-array name='occupancy' count='16'>
<static-array count='16'>
<bitfield type-name='tile_occupancy' base-type='uint32_t'/>
</static-array>
</static-array>
<static-array name='fog_of_war' count='16' comment='bay12: memmap; for adventure mode'>
<static-array count='16' type-name='uint8_t'/>
</static-array>
<static-array name='path_cost' count='16' comment='bay12: pmap'>
<comment>flood; 256*cost for straight, 362*cost for diagonal</comment>
<static-array count='16'>
<int32_t/>
</static-array>
</static-array>
<static-array name='path_tag' count='16' comment='bay12: dirmap'>
<comment>flood; sync to path_distance; same value; inc per run; reset to 0 on wraparound</comment>
<static-array count='16'>
<uint16_t/>
</static-array>
</static-array>
<static-array name='walkable' count='16' comment='bay12: levelmap'>
<comment>0 = non-walkable; same nonzero at A and B = walkable from A to B</comment>
<static-array count='16'>
<int16_t/>
</static-array>
</static-array>
<static-array name='map_edge_distance' count='16' comment='bay12: dlevelmap'>
<comment>1 at walkable map edge; then +1 per 10 tiles it seems; 0 in dug tunnels</comment>
<static-array count='16'>
<int16_t/>
</static-array>
</static-array>
<static-array name='temperature_1' count='16' comment='bay12: current_temperature'>
<static-array count='16'>
<uint16_t/>
</static-array>
</static-array>
<static-array name='temperature_2' count='16' comment='bay12: normal_temperature'>
<static-array count='16'>
<uint16_t/>
</static-array>
</static-array>
<static-array name='lighting' count='16'>
<static-array count='16'>
<uint16_t/>
</static-array>
</static-array>
<static-array name='liquid_flow' count='16'>
<static-array count='16'>
<bitfield type-name='tile_liquid_flow' base-type='uint16_t'/>
</static-array>
</static-array>
<static-array name='region_offset' count='9'>
<int8_t/>
</static-array>
</struct-type>
<bitfield-type type-name='cave_column_flag' base-type='uint8_t'> bay12: CAVE_COLUMN_FLAG_*
<flag-bit name='UNSTABLE'/>
<flag-bit name='ULTRA_SUPPORTED'/>
</bitfield-type>
<df-linked-list-type type-name='cave_column_link' item-type='cave_column'/>
<class-type type-name='cave_column' df-list-link-type='cave_column_link' df-list-link-field='' original-name='cave_columnst'>
<int16_t name='base_z'/>
<int16_t name='top_z'/>
<uint16_t name='rect_index' init-value='30000'/>
<bitfield name='flags' base-type='uint8_t' type-name='cave_column_flag'/>
<virtual-methods>
<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>
</virtual-methods>
</class-type>
<bitfield-type type-name='cave_column_rectangle_flag' base-type='uint32_t'> bay12: CAVE_COLUMN_RECTANGLE_FLAG_*
<flag-bit name='SUPPORTED'/>
<flag-bit name='UNSTABLE'/>
<flag-bit name='ULTRA_SUPPORTED'/>
</bitfield-type>
<class-type type-name='cave_column_rectangle' original-name='cave_column_rectanglest'>
<int32_t name='weight'/>
<int16_t name='min_x'/>
<int16_t name='min_y'/>
<int16_t name='max_x'/>
<int16_t name='max_y'/>
<int16_t name='base_z'/>
<stl-vector type-name='int16_t' name='neighbor_bx'/>
<stl-vector type-name='int16_t' name='neighbor_by'/>
<stl-vector type-name='uint16_t' name='neighbor_index'/>
<bitfield name='flags' base-type='uint32_t' type-name='cave_column_rectangle_flag'/>
<virtual-methods>
<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>
</virtual-methods>
</class-type>
<struct-type type-name='block_column_print_infost'>
<static-array name='x' count='4' type-name='int16_t'/>
<static-array name='y' count='4' type-name='int16_t'/>
<static-array name='tile' count='4' type-name='uint8_t'/>
</struct-type>
<enum-type type-name='map_block_column_flags'> bay12: BlockColumnFlagType
<enum-item name='UPDATE_CAVE_COLUMNS'/>
</enum-type>
<struct-type type-name='map_block_column' original-name='block_columnst'>
<int16_t name="sink_level" comment='bay12: water_el_table_block; water at or above this level sinks into aquifer tiles'/>
<int16_t name="beach_level" comment='bay12: water_el_sink_height; water at this level disappears if above more water'/>
<int16_t name='ground_level' comment='bay12: central_el_z; for coloring unallocated blocks'/>
<stl-vector name='unmined_glyphs' pointer-type='block_column_print_infost'/>
<int16_t name="z_base"/>
<static-array name='cave_columns' count='16'>
<static-array count='16'>
<df-linked-list type-name='cave_column_link'/>
</static-array>
</static-array>
<stl-vector name='column_rectangles' pointer-type='cave_column_rectangle'/>
<int16_t name='z_shift' comment='seems to be 0 originally, but updated when map is shifted'/>
<df-flagarray name='flags' index-enum='map_block_column_flags'/>
<static-array name='elevation' count='16' since='v0.40.01'>
<static-array count='16' type-name='int16_t' init-value='100'/>
</static-array>
<int16_t name='minimum_river_z'/>
<compound name='map_pos' type-name='coord' comment='top left in tiles'/>
<compound name='region_pos' type-name='coord2d'/>
<stl-vector name='plants' pointer-type='plant' comment="Only populated for the top left column in each mid level tile"/>
</struct-type>
</data-definition>
<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->