Add reusable content sets publication previews and focused input handling
This commit is contained in:
@@ -52,7 +52,6 @@ func (b Balance) validateProgression() error {
|
||||
return fmt.Errorf("too many title definitions")
|
||||
}
|
||||
seen := map[string]bool{}
|
||||
metrics := map[string]bool{"level": true, "kills": true, "worldKills": true, "bossKills": true, "worldsSurvived": true, "gathering": true, "crafting": true, "combat": true, "deaths": true}
|
||||
for _, title := range b.Titles {
|
||||
if !titleID.MatchString(title.ID) || seen[title.ID] || len(title.Name) < 1 || len(title.Name) > 80 || len(title.Description) > 500 {
|
||||
return fmt.Errorf("invalid or duplicate title %q", title.ID)
|
||||
@@ -65,7 +64,7 @@ func (b Balance) validateProgression() error {
|
||||
return fmt.Errorf("title %q needs bounded requirements", title.ID)
|
||||
}
|
||||
for _, r := range title.Requirements {
|
||||
if (!metrics[r.Metric] && !KnownStat(r.Metric)) || r.AtLeast < 1 || r.AtLeast > 1000000000 {
|
||||
if !ValidRequirement(r) {
|
||||
return fmt.Errorf("invalid title requirement for %q", title.ID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user