Handle optionnal flags
This commit is contained in:
parent
e581630d5e
commit
a414cd22c8
18 changed files with 68 additions and 22 deletions
|
|
@ -43,7 +43,8 @@ type ExerciceFlag struct {
|
|||
SortReGroups bool `toml:"sort_validator_regexp_groups,omitempty"`
|
||||
Placeholder string `toml:",omitempty"`
|
||||
Help string `toml:",omitempty"`
|
||||
ChoicesCost int64 `toml:"choices_cost,omitempty"`
|
||||
BonusGain int32 `toml:"bonus_gain,omitempty"`
|
||||
ChoicesCost int32 `toml:"choices_cost,omitempty"`
|
||||
Choice []ExerciceFlagChoice
|
||||
LockedFile []ExerciceUnlockFile `toml:"unlock_file,omitempty"`
|
||||
NeedFlag []ExerciceDependency `toml:"need_flag,omitempty"`
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ func buildKeyFlag(exercice *fic.Exercice, flag ExerciceFlag, flagline int, defau
|
|||
SortReGroups: flag.SortReGroups,
|
||||
Checksum: hashedFlag[:],
|
||||
ChoicesCost: flag.ChoicesCost,
|
||||
BonusGain: flag.BonusGain,
|
||||
})
|
||||
f = &fl
|
||||
|
||||
|
|
|
|||
Reference in a new issue