Merge branch 'automnml' of ssh://git.mnml.gg:40022/~/mnml into automnml

This commit is contained in:
Mashy 2021-03-20 13:04:33 +10:00
commit 6026203066
2 changed files with 9 additions and 3 deletions

View File

@ -309,6 +309,10 @@ 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"));
// }
self.specs.push(spec);
return Ok(self.calculate_colours());
}

View File

@ -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)
}