Added placement zones

This commit is contained in:
Sebastien Riviere
2025-09-07 17:24:29 +02:00
parent 93f9a05b1a
commit 75f8b10ecd
17 changed files with 436 additions and 201 deletions

View File

@@ -114,6 +114,7 @@ export default {
team.finishDate = null;
sendUpdatedTeamInformations(team.id);
}
this.updateChasingChain();
secureAdminBroadcast("teams", this.teams);
},
@@ -317,6 +318,19 @@ export default {
return true;
},
placementTeam(teamId, placementZone) {
// Test of parameters
if (!this.hasTeam(teamId)) return false;
// Variables
const team = this.getTeam(teamId);
// Make the capture
team.startingArea = placementZone;
// Broadcast new infos
secureAdminBroadcast("teams", this.teams);
sendUpdatedTeamInformations(team.id);
return true;
},
reorderTeams(newOrder) {
// Update teams
const teamMap = new Map(this.teams.map(team => [team.id, team]));