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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user