-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBasic.proto
More file actions
207 lines (156 loc) · 4.62 KB
/
Basic.proto
File metadata and controls
207 lines (156 loc) · 4.62 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
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;
message EnumItemName {
required int32 value = 1;
optional string name = 2;
// For bitfield members
optional int32 bit_size = 3 [default = 1];
};
message BasicMaterialId {
required int32 type = 1;
required sint32 index = 2;
};
message BasicMaterialInfo {
required int32 type = 1;
required sint32 index = 2;
// The raw token
required string token = 3;
// IF mask.flags:
// List of material_flags indices
repeated int32 flags = 4;
// Material type/index expanded:
optional int32 subtype = 5 [default = -1];
optional int32 creature_id = 6 [default = -1];
optional int32 plant_id = 7 [default = -1];
optional int32 histfig_id = 8 [default = -1];
optional string name_prefix = 9 [default = ""];
// IF mask.states: in listed order;
// ELSE: one state matching mask.temperature
repeated fixed32 state_color = 10;
repeated string state_name = 11;
repeated string state_adj = 12;
// IF mask.reaction:
message Product {
required string id = 1;
required int32 type = 2;
required sint32 index = 3;
};
repeated string reaction_class = 13;
repeated Product reaction_product = 14;
// IF mask.flags:
repeated int32 inorganic_flags = 15;
};
message BasicMaterialInfoMask {
enum StateType {
Solid = 0;
Liquid = 1;
Gas = 2;
Powder = 3;
Paste = 4;
Pressed = 5;
};
repeated StateType states = 1;
optional int32 temperature = 4 [default = 10015];
optional bool flags = 2 [default = false];
optional bool reaction = 3 [default = false];
};
message JobSkillAttr {
required int32 id = 1;
required string key = 2;
optional string caption = 3;
optional string caption_noun = 4;
optional int32 profession = 5;
optional int32 labor = 6;
optional string type = 7;
};
message ProfessionAttr {
required int32 id = 1;
required string key = 2;
optional string caption = 3;
optional bool military = 4;
optional bool can_assign_labor = 5;
optional int32 parent = 6;
};
message UnitLaborAttr {
required int32 id = 1;
required string key = 2;
optional string caption = 3;
};
message NameInfo {
optional string first_name = 1;
optional string nickname = 2;
optional int32 language_id = 3 [default = -1];
optional string last_name = 4;
optional string english_name = 5;
};
message NameTriple {
required string normal = 1;
optional string plural = 2;
optional string adjective = 3;
};
message UnitCurseInfo {
required fixed32 add_tags1 = 1;
required fixed32 rem_tags1 = 2;
required fixed32 add_tags2 = 3;
required fixed32 rem_tags2 = 4;
optional NameTriple name = 5;
};
message SkillInfo {
required int32 id = 1;
required int32 level = 2;
required int32 experience = 3;
};
message UnitMiscTrait {
required int32 id = 1;
required int32 value = 2;
};
message BasicUnitInfo {
required int32 unit_id = 1;
required int32 pos_x = 13;
required int32 pos_y = 14;
required int32 pos_z = 15;
optional NameInfo name = 2;
required fixed32 flags1 = 3;
required fixed32 flags2 = 4;
required fixed32 flags3 = 5;
required int32 race = 6;
required int32 caste = 7;
optional int32 gender = 8 [default = -1];
optional int32 civ_id = 9 [default = -1];
optional int32 histfig_id = 10 [default = -1];
optional int32 death_id = 17 [default = -1];
optional uint32 death_flags = 18;
// IF mask.profession:
optional int32 squad_id = 19 [default = -1];
optional int32 squad_position = 20 [default = -1];
optional int32 profession = 22 [default = -1];
optional string custom_profession = 23;
// IF mask.labors:
repeated int32 labors = 11;
// IF mask.skills:
repeated SkillInfo skills = 12;
// IF mask.misc_traits:
repeated UnitMiscTrait misc_traits = 24;
optional UnitCurseInfo curse = 16;
repeated int32 burrows = 21;
};
message BasicUnitInfoMask {
optional bool labors = 1 [default = false];
optional bool skills = 2 [default = false];
optional bool profession = 3 [default = false];
optional bool misc_traits = 4 [default = false];
};
message BasicSquadInfo {
required int32 squad_id = 1;
optional NameInfo name = 2;
// A special field completely overriding the name:
optional string alias = 3;
// Member histfig ids:
repeated sint32 members = 4;
};
message UnitLaborState {
required int32 unit_id = 1;
required int32 labor = 2;
required bool value = 3;
};