-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBasicApi.proto
More file actions
109 lines (85 loc) · 2.73 KB
/
BasicApi.proto
File metadata and controls
109 lines (85 loc) · 2.73 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
syntax = "proto2";
package dfproto;
option optimize_for = LITE_RUNTIME;
import "Basic.proto";
// RPC GetVersion : EmptyMessage -> StringMessage
// RPC GetDFVersion : EmptyMessage -> StringMessage
// RPC GetWorldInfo : EmptyMessage -> GetWorldInfoOut
message GetWorldInfoOut {
enum Mode {
MODE_DWARF = 1;
MODE_ADVENTURE = 2;
MODE_LEGENDS = 3;
};
required Mode mode = 1;
required string save_dir = 2;
optional NameInfo world_name = 3;
// Dwarf mode
optional int32 civ_id = 4;
optional int32 site_id = 5;
optional int32 group_id = 6;
optional int32 race_id = 7;
// Adventure mode
optional int32 player_unit_id = 8;
optional int32 player_histfig_id = 9;
repeated int32 companion_histfig_ids = 10;
};
// RPC ListEnums : EmptyMessage -> ListEnumsOut
message ListEnumsOut {
repeated EnumItemName material_flags = 1;
repeated EnumItemName inorganic_flags = 2;
repeated EnumItemName unit_flags1 = 3;
repeated EnumItemName unit_flags2 = 4;
repeated EnumItemName unit_flags3 = 5;
repeated EnumItemName unit_labor = 6;
repeated EnumItemName job_skill = 7;
repeated EnumItemName cie_add_tag_mask1 = 8;
repeated EnumItemName cie_add_tag_mask2 = 9;
repeated EnumItemName death_info_flags = 10;
repeated EnumItemName profession = 11;
};
// RPC ListJobSkills : EmptyMessage -> ListJobSkillsOut
message ListJobSkillsOut {
repeated JobSkillAttr skill = 1;
repeated ProfessionAttr profession = 2;
repeated UnitLaborAttr labor = 3;
};
// RPC ListMaterials : ListMaterialsIn -> ListMaterialsOut
message ListMaterialsIn {
optional BasicMaterialInfoMask mask = 1;
// Specific materials:
repeated BasicMaterialId id_list = 2;
// Complete list by type:
optional bool builtin = 3;
optional bool inorganic = 4;
optional bool creatures = 5;
optional bool plants = 6;
};
message ListMaterialsOut {
repeated BasicMaterialInfo value = 1;
};
// RPC ListUnits : ListUnitsIn -> ListUnitsOut
message ListUnitsIn {
optional BasicUnitInfoMask mask = 1;
// Specific units:
repeated int32 id_list = 2;
// All units matching:
optional bool scan_all = 5;
optional int32 race = 3;
optional int32 civ_id = 4;
optional bool dead = 6; // i.e. passive corpse
optional bool alive = 7; // i.e. not dead or undead
optional bool sane = 8; // not dead, ghost, zombie, or insane
};
message ListUnitsOut {
repeated BasicUnitInfo value = 1;
};
// RPC ListSquads : ListSquadsIn -> ListSquadsOut
message ListSquadsIn {}
message ListSquadsOut {
repeated BasicSquadInfo value = 1;
};
// RPC SetUnitLabors : SetUnitLaborsIn -> EmptyMessage
message SetUnitLaborsIn {
repeated UnitLaborState change = 1;
};