Fix
This commit is contained in:
@@ -124,7 +124,7 @@ impl PersonalInventory {
|
|||||||
|
|
||||||
pub fn can_accept(&self, item_weight: u32) -> bool {
|
pub fn can_accept(&self, item_weight: u32) -> bool {
|
||||||
self.slots.len() < self.max_slots as usize
|
self.slots.len() < self.max_slots as usize
|
||||||
&& self.current_weight + item_weight <= self.max_carry_weight()
|
&& self.current_weight.saturating_add(item_weight) <= self.max_carry_weight()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_full(&self) -> bool {
|
pub fn is_full(&self) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user