Handle optionnal flags

This commit is contained in:
nemunaire 2022-05-31 22:03:51 +02:00
commit a414cd22c8
18 changed files with 68 additions and 22 deletions

View file

@ -11,6 +11,15 @@ function createMyStore() {
for (let k in my.exercices) {
my.exercices[k].id = k;
if (my.exercices[k].flags) {
let nb = 0;
for (let j in my.exercices[k].flags) {
if (!my.exercices[k].flags[j].found)
nb += 1;
}
my.exercices[k].non_found_flags = nb;
}
if (my.team_id === 0 && my.exercices[k].hints) {
for (let j in my.exercices[k].hints) {
my.exercices[k].hints[j].hidden = true;