From 6028d97d99955ec0315d7e3ec2a746eeb7a0b4ea Mon Sep 17 00:00:00 2001 From: ntr Date: Sat, 20 Mar 2021 12:53:28 +1000 Subject: [PATCH] fix colour calcs for construct stats --- core/src/construct.rs | 6 +++--- core/src/player.rs | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/construct.rs b/core/src/construct.rs index 3703e74c..7adf0d54 100644 --- a/core/src/construct.rs +++ b/core/src/construct.rs @@ -309,9 +309,9 @@ impl Construct { } pub fn spec_add(&mut self, spec: Spec) -> Result<&mut Construct, Error> { - if self.specs.len() >= 3 { - return Err(err_msg("maximum specs equipped")); - } + // if self.specs.len() >= 3 { + // return Err(err_msg("maximum specs equipped")); + // } self.specs.push(spec); return Ok(self.calculate_colours()); diff --git a/core/src/player.rs b/core/src/player.rs index 6e5d34d0..a29e90fa 100644 --- a/core/src/player.rs +++ b/core/src/player.rs @@ -389,9 +389,11 @@ impl Player { // } // }); - // for construct in self.constructs.iter_mut() { - // construct.apply_modifiers(&player_colours); - // } + let player_colours = Colours { red: 0, blue: 0, green: 0 }; + + for construct in self.constructs.iter_mut() { + construct.apply_modifiers(&player_colours); + } Ok(self) }