return QVariant();
}
} else if (index.column() == 2) {
- return QString::fromUtf8(events[index.row()].type);
+ string type = e.type;
+ type[0] = toupper(e.type[0]);
+ for (char &ch : type) {
+ if (ch == '_') {
+ ch = ' ';
+ }
+ }
+
+ // Various fixups.
+ if (type == "Pull oob") {
+ type = "Pull OOB";
+ } else if (type == "Formation defense") {
+ type = "Defensive formation";
+ } else if (type == "Formation offense") {
+ type = "Offensive formation";
+ } else if (type == "Set offense") {
+ type = "On offense";
+ } else if (type == "Set defense") {
+ type = "On defense";
+ } else if (type == "Catch") {
+ type = "Catch/take";
+ }
+
+ return QString::fromUtf8(type);
}
return QVariant();
}
s.our_score = 0;
s.their_score = 0;
s.attack_state = Status::NOT_STARTED;
+ s.offensive_formation = 0;
+ s.defensive_formation = 0;
s.stoppage = false;
s.pull_state = Status::SHOULD_PULL;
uint64_t last_gained_possession = 0;
last_stoppage = 0;
}
}
+ if (e.type == "formation_offense") {
+ if (e.formation_id) {
+ s.offensive_formation = *e.formation_id;
+ } else {
+ s.offensive_formation = 0;
+ }
+ }
+ if (e.type == "formation_defense") {
+ if (e.formation_id) {
+ s.defensive_formation = *e.formation_id;
+ } else {
+ s.defensive_formation = 0;
+ }
+ }
}
if (s.stoppage && last_stoppage != 0) {
time_spent_in_stoppage += (t - last_stoppage);