Skip to content

Commit

Permalink
🎉 implement check color from referee
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamagoham committed Jun 29, 2024
1 parent 06e1085 commit 432767b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions createprotos.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"log"

"github.com/Rione-SSL/RACOON-MW/proto/pb_gen"
)

Expand Down Expand Up @@ -255,6 +257,13 @@ func createRefInfo(ourteam int) *pb_gen.Referee_Info {
teaminfo_their = (*pb_gen.Referee_Info_TeamInfo)(ref_command.Blue)
}

// Check if the team color is correct
if ourteam == 0 && ref_command.GetYellow().GetName() == "Ri-one" {
log.Println("[MW WARNING!!] INCORRECT TEAM COLOR! Referee says (Ri-one == BLUE)")
} else if ourteam == 1 && ref_command.GetBlue().GetName() == "Ri-one" {
log.Println("[MW WARNING!!] INCORRECT TEAM COLOR! Referee says (Ri-one == YELLOW)")
}

} else {
yellowcards = 0
redcards = 0
Expand Down

0 comments on commit 432767b

Please sign in to comment.