settings: change param to enable/disable depends by the depth

This commit is contained in:
nemunaire 2019-01-18 20:30:47 +01:00
parent 5d432cdcfc
commit 4ee70a8781
6 changed files with 12 additions and 15 deletions

View file

@ -52,13 +52,9 @@ func reloadSettings(config settings.FICSettings) {
fic.WChoiceCoefficient = config.WChoiceCurCoefficient
fic.ExerciceCurrentCoefficient = config.ExerciceCurCoefficient
ChStarted = time.Since(config.Start) >= 0
if lastRegeneration != config.Generation || fic.PartialValidation != config.PartialValidation || fic.FirstBlood != config.FirstBlood || fic.SubmissionCostBase != config.SubmissionCostBase || fic.SubmissionUniqueness != config.SubmissionUniqueness {
if lastRegeneration != config.Generation || fic.PartialValidation != config.PartialValidation || fic.UnlockedChallengeDepth != config.UnlockedChallengeDepth || fic.FirstBlood != config.FirstBlood || fic.SubmissionCostBase != config.SubmissionCostBase || fic.SubmissionUniqueness != config.SubmissionUniqueness {
fic.PartialValidation = config.PartialValidation
if config.EnableExerciceDepend {
fic.UnlockedChallengeDepth = 0
} else {
fic.UnlockedChallengeDepth = -1
}
fic.UnlockedChallengeDepth = config.UnlockedChallengeDepth
fic.FirstBlood = config.FirstBlood
fic.SubmissionCostBase = config.SubmissionCostBase