index fix
This commit is contained in:
+3
-1
@@ -19,7 +19,9 @@
|
||||
*CLIENT*
|
||||
* general
|
||||
* icons change with %
|
||||
* colour vbox icons
|
||||
|
||||
* game
|
||||
* resolve animations + effects
|
||||
|
||||
*SERVER*
|
||||
var / skill info rpc
|
||||
|
||||
@@ -118,7 +118,13 @@ impl Player {
|
||||
false => 2,
|
||||
};
|
||||
|
||||
if self.vbox.bound.len() < 3 {
|
||||
|
||||
let num_colours = self.vbox.bound
|
||||
.iter()
|
||||
.filter(|v| [Var::Red, Var::Green, Var::Blue].contains(v))
|
||||
.count();
|
||||
|
||||
if self.vbox.bound.len() < 3 || num_colours < 2 {
|
||||
if (needs_skills && self.vbox.bits < 4) || self.vbox.bits < 5 {
|
||||
// println!("insufficient balance");
|
||||
return self;
|
||||
|
||||
+1
-1
@@ -526,7 +526,7 @@ impl Vbox {
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, index)| {
|
||||
self.bound.remove(*index - i)
|
||||
self.bound.remove(index.saturating_sub(i))
|
||||
})
|
||||
.collect::<Vec<Var>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user