sync: Allow free hint
This commit is contained in:
parent
43be59b97d
commit
57d351c6c1
@ -12,7 +12,7 @@ import (
|
||||
type ExerciceHintParams struct {
|
||||
Filename string
|
||||
Content string
|
||||
Cost int64
|
||||
Cost *int64
|
||||
Title string
|
||||
NeedFlag []ExerciceDependency `toml:"need_flag,omitempty"`
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ func buildExerciceHints(i Importer, exercice fic.Exercice) (hints []importHint,
|
||||
} else {
|
||||
h.Title = fixnbsp(hint.Title)
|
||||
}
|
||||
if hint.Cost <= 0 {
|
||||
if hint.Cost == nil {
|
||||
h.Cost = exercice.Gain / 4
|
||||
} else {
|
||||
h.Cost = hint.Cost
|
||||
h.Cost = *hint.Cost
|
||||
}
|
||||
|
||||
if hint.Filename != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user