Handle optionnal flags
This commit is contained in:
parent
e581630d5e
commit
a414cd22c8
18 changed files with 68 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Reference in a new issue