limit inventory to 10 slots
This commit is contained in:
@@ -93,10 +93,11 @@ impl Artifact for Potion {
|
||||
);
|
||||
self.health = 0;
|
||||
self.was_collected = true;
|
||||
} else {
|
||||
} else if player.add_to_inventory(self) {
|
||||
messages.insert(0, "move potion to inventory.".to_string());
|
||||
player.add_to_inventory(self);
|
||||
self.was_collected = true;
|
||||
} else {
|
||||
messages.insert(0, "inventory is full.".to_string());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user