rare spec dupe check

This commit is contained in:
ntr
2019-01-17 19:34:41 +11:00
parent b9ebf89c19
commit 607cb4de1c
2 changed files with 4 additions and 4 deletions
-3
View File
@@ -33,9 +33,6 @@ strangle
## NOW
* check zone completion
* serialize modified stats
* remove spec from cryp
* dupe rare specs check
## SOON
* clean up categories
+4 -1
View File
@@ -295,7 +295,10 @@ impl Cryp {
return Err(format_err!("cryp at maximum rare specalisations ({:})", max_rare))
}
// check dupes
if self.specs.rare.iter().find(|s| s.spec == spec.spec).is_some() {
return Err(format_err!("duplicate rare specialisation {:?}", spec.spec));
}
self.specs.rare.push(spec);
},
};