fix colour calcs for construct stats

This commit is contained in:
ntr 2021-03-20 12:53:28 +10:00
parent 4c4304e60e
commit 6028d97d99
2 changed files with 8 additions and 6 deletions

View File

@ -309,9 +309,9 @@ impl Construct {
} }
pub fn spec_add(&mut self, spec: Spec) -> Result<&mut Construct, Error> { pub fn spec_add(&mut self, spec: Spec) -> Result<&mut Construct, Error> {
if self.specs.len() >= 3 { // if self.specs.len() >= 3 {
return Err(err_msg("maximum specs equipped")); // return Err(err_msg("maximum specs equipped"));
} // }
self.specs.push(spec); self.specs.push(spec);
return Ok(self.calculate_colours()); return Ok(self.calculate_colours());

View File

@ -389,9 +389,11 @@ impl Player {
// } // }
// }); // });
// for construct in self.constructs.iter_mut() { let player_colours = Colours { red: 0, blue: 0, green: 0 };
// construct.apply_modifiers(&player_colours);
// } for construct in self.constructs.iter_mut() {
construct.apply_modifiers(&player_colours);
}
Ok(self) Ok(self)
} }