From 204a85ad42fa29298aea47832b77033ca0b8d987 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 8 Dec 2017 23:19:46 -0500 Subject: [PATCH 1/3] Updated protobuf documentation on CloakState Closes #21 --- s2clientprotocol/raw.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/s2clientprotocol/raw.proto b/s2clientprotocol/raw.proto index 47e2da7..5c603a1 100644 --- a/s2clientprotocol/raw.proto +++ b/s2clientprotocol/raw.proto @@ -65,10 +65,11 @@ enum Alliance { Enemy = 4; } +// Currently it is not possible to observe the "shimmer" of a cloaked and undetected unit. enum CloakState { - Cloaked = 1; - CloakedDetected = 2; - NotCloaked = 3; + Cloaked = 1; // A unit that is currently cloaked. Only applies to your own units. + CloakedDetected = 2; // An enemy unit that was cloaked, but is currently being detected by a detector. + NotCloaked = 3; // A regular un-cloaked unit. } message PassengerUnit { From d46baf80e2fbc973b1cd6d8dc1b9083e129c51d0 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 8 Dec 2017 23:21:57 -0500 Subject: [PATCH 2/3] Added comment about the Action message In testing, it seems that only one of these fields can be set. If multiple fields are set, only the first field is acted upon (the other actions are ignored). Should this be converted to a `oneof` type? --- s2clientprotocol/sc2api.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/s2clientprotocol/sc2api.proto b/s2clientprotocol/sc2api.proto index 4679802..95321b0 100644 --- a/s2clientprotocol/sc2api.proto +++ b/s2clientprotocol/sc2api.proto @@ -567,6 +567,8 @@ message Observation { optional ObservationUI ui_data = 8; // Populated if Feature Layer or Render interface is enabled. } +// Only one of these Action fields should be set at once +// TODO make this a `oneof` ? message Action { optional ActionRaw action_raw = 1; // Populated if Raw interface is enabled. optional ActionSpatial action_feature_layer = 2; // Populated if Feature Layer interface is enabled. From d788424935ebebe861e842d5772623c4b38b0fde Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Thu, 8 Feb 2018 09:33:11 -0500 Subject: [PATCH 3/3] Updated comment about Action message --- s2clientprotocol/sc2api.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s2clientprotocol/sc2api.proto b/s2clientprotocol/sc2api.proto index 95321b0..6cc7030 100644 --- a/s2clientprotocol/sc2api.proto +++ b/s2clientprotocol/sc2api.proto @@ -567,8 +567,8 @@ message Observation { optional ObservationUI ui_data = 8; // Populated if Feature Layer or Render interface is enabled. } -// Only one of these Action fields should be set at once -// TODO make this a `oneof` ? +// When sending an Action, only set one of these fields. +// Multiple fields may be set in a reply. message Action { optional ActionRaw action_raw = 1; // Populated if Raw interface is enabled. optional ActionSpatial action_feature_layer = 2; // Populated if Feature Layer interface is enabled.