summaryrefslogtreecommitdiff
path: root/library/proto
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-03-18 11:04:15 +0400
committerAlexander Gavrilov2012-03-18 11:04:15 +0400
commitb9ecd03fe2c4013a57f30ada6534a248b27b7515 (patch)
treefe42dc901accb7cdea3319d9f3b1de5da46943c4 /library/proto
parent293eb53677ebcb5fb5db83b6a3df99ba635fe6af (diff)
downloaddfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.gz
dfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.bz2
dfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.xz
Make the server suspend the core around calls unless disabled.
I expect the majority of methods will have to suspend the core first thing anyway, so this will reduce typing and bugs. Also get rid of the "me->" ugliness by splitting threadFn.
Diffstat (limited to 'library/proto')
-rw-r--r--library/proto/Basic.proto18
-rw-r--r--library/proto/BasicApi.proto7
2 files changed, 24 insertions, 1 deletions
diff --git a/library/proto/Basic.proto b/library/proto/Basic.proto
index 6e58345f..145727ce 100644
--- a/library/proto/Basic.proto
+++ b/library/proto/Basic.proto
@@ -5,6 +5,8 @@ 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];
};
@@ -16,10 +18,15 @@ message BasicMaterialId {
message BasicMaterialInfo {
required int32 type = 1;
required sint32 index = 2;
+
+ // The raw token
required string token = 3;
- repeated int32 flags = 4; // of material_flags
+ // 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];
@@ -27,10 +34,13 @@ message BasicMaterialInfo {
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;
@@ -39,6 +49,7 @@ message BasicMaterialInfo {
repeated string reaction_class = 13;
repeated Product reaction_product = 14;
+ // IF mask.flags:
repeated int32 inorganic_flags = 15;
};
@@ -90,8 +101,10 @@ message BasicUnitInfo {
optional int32 civ_id = 9 [default = -1];
optional int32 histfig_id = 10 [default = -1];
+ // IF mask.labors:
repeated int32 labors = 11;
+ // IF mask.skills:
repeated SkillInfo skills = 12;
required int32 pos_x = 13;
@@ -108,7 +121,10 @@ 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;
};
diff --git a/library/proto/BasicApi.proto b/library/proto/BasicApi.proto
index 33f2a576..308b1a32 100644
--- a/library/proto/BasicApi.proto
+++ b/library/proto/BasicApi.proto
@@ -18,7 +18,11 @@ message ListEnumsOut {
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;
@@ -30,8 +34,11 @@ message ListMaterialsOut {
message ListUnitsIn {
optional BasicUnitInfoMask mask = 1;
+
+ // Specific units:
repeated int32 id_list = 2;
+ // All units matching:
optional int32 race = 3;
optional int32 civ_id = 4;
};