Skip to content

Commit

Permalink
Merge pull request #73 from DCS-gRPC/unit-category
Browse files Browse the repository at this point in the history
add category to common.v0.Unit
  • Loading branch information
rkusa authored Nov 11, 2021
2 parents bad67ee + 71a4d0d commit 221a599
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lua/exporters/object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ GRPC.exporters.unit = function(unit)
groupName = Unit.getGroup(unit):getName(),
numberInGroup = unit:getNumber(),
heading = heading,
speed = speed
speed = speed,
category = unit:getGroup():getCategory(),
}
end

Expand Down
2 changes: 2 additions & 0 deletions protos/dcs/common/v0/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ message Unit {
double speed = 10;
// The heading of the unit
double heading = 11;
// The group category.
GroupCategory category = 12;
}

/**
Expand Down
6 changes: 4 additions & 2 deletions stubs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ mod tests {
"groupName": "Group 1",
"numberInGroup": 1,
"heading": 0.5,
"speed": 0.8
"speed": 0.8,
"category": 0
}
}
},
Expand Down Expand Up @@ -159,7 +160,8 @@ mod tests {
group_name: "Group 1".to_string(),
number_in_group: 1,
heading: 0.5,
speed: 0.8
speed: 0.8,
category: 0,
}))
}),
visibility: Some(event::mark_add_event::Visibility::Coalition(
Expand Down

0 comments on commit 221a599

Please sign in to comment.