Added a sell command

+ Added a bot status
+ Fixed NFTs so you can only have one at a time
+ clippy + fmt
This commit is contained in:
2023-01-21 13:23:11 -07:00
parent 9f5d68f4b2
commit 6896ee610c
3 changed files with 82 additions and 14 deletions
+8 -2
View File
@@ -102,7 +102,7 @@ impl InventorySlot {
let per_value = (hash as f64) / (u64::MAX as f64);
((2000.0 * per_value) as i64) - 1000
((2000.0 * per_value) as i64) - 500
} else {
0
}
@@ -150,7 +150,13 @@ impl InventoryManager {
}),
Some(slot) => {
slot.item_data = item_data;
slot.quantity += quantity;
// Only one NFT at a time
if item_type != ItemType::Nft {
slot.quantity += quantity;
} else {
slot.quantity = 1;
}
}
}
}