forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
df.machines.xml
149 lines (120 loc) · 4.88 KB
/
df.machines.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
<data-definition>
-- MACHINE
<enum-type type-name='machine_type'>
<enum-item name='standard'/>
</enum-type>
<struct-type type-name='machine_info'>
<int32_t name="machine_id" ref-target='machine'/>
<bitfield name='flags'>
<flag-bit name='frozen'/>
</bitfield>
</struct-type>
<struct-type type-name='power_info'>
<int32_t name='produced'/>
<int32_t name='consumed'/>
</struct-type>
<bitfield-type type-name='machine_conn_modes' base-type='uint8_t'>
<flag-bit name='up'/>
<flag-bit name='down'/>
<flag-bit name='right'/>
<flag-bit name='left'/>
<flag-bit name='z_up'/>
<flag-bit name='z_down'/>
</bitfield-type>
<struct-type type-name='machine_tile_set'>
<compound name='tiles' type-name='coord_path'/>
<stl-vector name='can_connect'>
<bitfield type-name='machine_conn_modes'/>
</stl-vector>
</struct-type>
<class-type type-name='machine' original-name='machinest'
instance-vector='$global.world.machines.all' key-field='id'>
<int32_t name="x"/>
<int32_t name="y"/>
<int32_t name="z"/>
<int32_t name="id"/>
<stl-vector name="components">
<pointer>
<int32_t name="building_id" ref-target='building'/>
<stl-vector name="connections" type-name='int32_t'
comment='indices into the same component vector'/>
</pointer>
</stl-vector>
<int32_t name="cur_power"/>
<int32_t name="min_power"/>
<int8_t name='visual_phase'/>
<int16_t name="phase_timer"/>
<bitfield name="flags">
<flag-bit name='active'/>
<flag-bit name='frozen' comment='?'/>
<flag-bit name='unfreeze' comment='?'/>
</bitfield>
<virtual-methods>
<vmethod ret-type='machine_type' name='getType'/>
<vmethod name='moveMachine'>
<int16_t name='x'/>
<int16_t name='y'/>
<int16_t name='z'/>
</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 is-destructor='true'/>
</virtual-methods>
</class-type>
<class-type type-name='machine_standardst' inherits-from='machine'>
</class-type>
-- MACHINE COMPONENT BUILDINGS
<class-type type-name='building_axle_horizontalst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<bool name='is_vertical'/>
</class-type>
<class-type type-name='building_axle_verticalst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
</class-type>
<class-type type-name='building_gear_assemblyst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<bitfield name='gear_flags'>
<flag-bit name='disengaged'/>
</bitfield>
</class-type>
<class-type type-name='building_windmillst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<int16_t name="orient_x" init-value='-1'/>
<int16_t name="orient_y"/>
<int16_t name="is_working"/>
<bool name="visual_rotated"/>
<int16_t name="rotate_timer"/>
<int16_t name="orient_timer"/>
</class-type>
<class-type type-name='building_water_wheelst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<bool name='is_vertical'/>
<bool name='gives_power'/>
</class-type>
<enum-type type-name='screw_pump_direction' base-type='int8_t'>
<enum-item name='FromNorth'/>
<enum-item name='FromEast'/>
<enum-item name='FromSouth'/>
<enum-item name='FromWest'/>
</enum-type>
<class-type type-name='building_screw_pumpst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<uint8_t name='pump_energy' comment='decreases by 1 every frame. powering or manually pumping maintains near 100'/>
<enum name='direction' base-type='int8_t' type-name='screw_pump_direction'/>
<bool name='pump_manually'/>
</class-type>
<class-type type-name='building_rollersst' inherits-from='building_actual'>
<compound name='machine' type-name='machine_info'/>
<enum name='direction' base-type='int32_t' type-name='screw_pump_direction'/>
<int32_t name='speed' init-value='50000'/>
</class-type>
</data-definition>
<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->