Skip to content

Commit b816c61

Browse files
committed
Visualize bot substitution intent
1 parent 95a3e47 commit b816c61

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

src/components/Card.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
border-style: dotted;
2222
border-width: 0.4vh;
2323
display: inline-block;
24+
margin: 0.1em;
2425
}
2526
2627
.card-pic {

src/components/TeamStatus.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div :class="{'bot-substitution-intent': botSubstitutionIntent}">
33
<div :class="{'team-yellow': color === 'yellow', 'team-blue': color === 'blue'}" class="team-name">
44
<div class="team-name-text">{{team.name}}</div>
55
</div>
@@ -36,12 +36,20 @@
3636
},
3737
markYellowCard() {
3838
return this.team.yellowCards > 0 && this.team.yellowCards % 3 === 0;
39+
},
40+
botSubstitutionIntent() {
41+
return this.team.botSubstitutionIntent;
3942
}
4043
}
4144
}
4245
</script>
4346

4447
<style scoped>
48+
49+
.bot-substitution-intent {
50+
background-color: #c2c3d0;
51+
}
52+
4553
.team-name {
4654
height: 15vh;
4755
display: flex;

src/proto/ssl_referee.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ message Referee {
147147
optional bool can_place_ball = 12;
148148
// The maximum number of bots allowed on the field based on division and cards
149149
optional uint32 max_allowed_bots = 13;
150+
// The team has submitted an intent to substitute one or more robots at the next chance
151+
optional bool bot_substitution_intent = 14;
150152
}
151153

152154
// Information about the two teams.

src/sslProto.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12872,6 +12872,7 @@ export const Referee = $root.Referee = (() => {
1287212872
* @property {number|null} [ballPlacementFailures] TeamInfo ballPlacementFailures
1287312873
* @property {boolean|null} [canPlaceBall] TeamInfo canPlaceBall
1287412874
* @property {number|null} [maxAllowedBots] TeamInfo maxAllowedBots
12875+
* @property {boolean|null} [botSubstitutionIntent] TeamInfo botSubstitutionIntent
1287512876
*/
1287612877

1287712878
/**
@@ -12986,6 +12987,14 @@ export const Referee = $root.Referee = (() => {
1298612987
*/
1298712988
TeamInfo.prototype.maxAllowedBots = 0;
1298812989

12990+
/**
12991+
* TeamInfo botSubstitutionIntent.
12992+
* @member {boolean} botSubstitutionIntent
12993+
* @memberof Referee.TeamInfo
12994+
* @instance
12995+
*/
12996+
TeamInfo.prototype.botSubstitutionIntent = false;
12997+
1298912998
/**
1299012999
* Creates a new TeamInfo instance using the specified properties.
1299113000
* @function create
@@ -13031,6 +13040,8 @@ export const Referee = $root.Referee = (() => {
1303113040
writer.uint32(/* id 12, wireType 0 =*/96).bool(message.canPlaceBall);
1303213041
if (message.maxAllowedBots != null && message.hasOwnProperty("maxAllowedBots"))
1303313042
writer.uint32(/* id 13, wireType 0 =*/104).uint32(message.maxAllowedBots);
13043+
if (message.botSubstitutionIntent != null && message.hasOwnProperty("botSubstitutionIntent"))
13044+
writer.uint32(/* id 14, wireType 0 =*/112).bool(message.botSubstitutionIntent);
1303413045
return writer;
1303513046
};
1303613047

@@ -13108,6 +13119,9 @@ export const Referee = $root.Referee = (() => {
1310813119
case 13:
1310913120
message.maxAllowedBots = reader.uint32();
1311013121
break;
13122+
case 14:
13123+
message.botSubstitutionIntent = reader.bool();
13124+
break;
1311113125
default:
1311213126
reader.skipType(tag & 7);
1311313127
break;
@@ -13190,6 +13204,9 @@ export const Referee = $root.Referee = (() => {
1319013204
if (message.maxAllowedBots != null && message.hasOwnProperty("maxAllowedBots"))
1319113205
if (!$util.isInteger(message.maxAllowedBots))
1319213206
return "maxAllowedBots: integer expected";
13207+
if (message.botSubstitutionIntent != null && message.hasOwnProperty("botSubstitutionIntent"))
13208+
if (typeof message.botSubstitutionIntent !== "boolean")
13209+
return "botSubstitutionIntent: boolean expected";
1319313210
return null;
1319413211
};
1319513212

@@ -13234,6 +13251,8 @@ export const Referee = $root.Referee = (() => {
1323413251
message.canPlaceBall = Boolean(object.canPlaceBall);
1323513252
if (object.maxAllowedBots != null)
1323613253
message.maxAllowedBots = object.maxAllowedBots >>> 0;
13254+
if (object.botSubstitutionIntent != null)
13255+
message.botSubstitutionIntent = Boolean(object.botSubstitutionIntent);
1323713256
return message;
1323813257
};
1323913258

@@ -13264,6 +13283,7 @@ export const Referee = $root.Referee = (() => {
1326413283
object.ballPlacementFailures = 0;
1326513284
object.canPlaceBall = false;
1326613285
object.maxAllowedBots = 0;
13286+
object.botSubstitutionIntent = false;
1326713287
}
1326813288
if (message.name != null && message.hasOwnProperty("name"))
1326913289
object.name = message.name;
@@ -13292,6 +13312,8 @@ export const Referee = $root.Referee = (() => {
1329213312
object.canPlaceBall = message.canPlaceBall;
1329313313
if (message.maxAllowedBots != null && message.hasOwnProperty("maxAllowedBots"))
1329413314
object.maxAllowedBots = message.maxAllowedBots;
13315+
if (message.botSubstitutionIntent != null && message.hasOwnProperty("botSubstitutionIntent"))
13316+
object.botSubstitutionIntent = message.botSubstitutionIntent;
1329513317
return object;
1329613318
};
1329713319

0 commit comments

Comments
 (0)