1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-09 15:37:45 +00:00

Move it to a constant, and remove redundant comment

This commit is contained in:
The Dax 2025-07-04 12:34:03 -04:00 committed by Joshua Goins
parent 5284801554
commit fde43a560d
2 changed files with 6 additions and 2 deletions

View file

@ -21,6 +21,8 @@ pub use storage::{ContainerType, Storage};
mod currency;
pub use currency::CurrencyStorage;
use crate::INVENTORY_ACTION_DISCARD;
const MAX_NORMAL_STORAGE: usize = 35;
const MAX_LARGE_STORAGE: usize = 50;
@ -164,8 +166,7 @@ impl Inventory {
}
pub fn process_action(&mut self, action: &ItemOperation) {
if action.operation_type == 145 {
// discard
if action.operation_type == INVENTORY_ACTION_DISCARD {
let src_container = self.get_container_mut(&action.src_storage_id);
let src_slot = src_container.get_slot_mut(action.src_container_index);
*src_slot = Item::default();

View file

@ -75,3 +75,6 @@ pub const AETHERYTE_UNLOCK_BITMASK_SIZE: usize = 30;
/// The size of the completed quest bitmask.
pub const COMPLETED_QUEST_BITMASK_SIZE: usize = 691;
/// The operation opcode/type when discarding an item from the inventory.
pub const INVENTORY_ACTION_DISCARD: u8 = 145;