mirror of
https://github.com/redstrate/Kawari.git
synced 2025-07-18 19:17:44 +00:00
15 lines
326 B
Rust
15 lines
326 B
Rust
|
use serde::{Deserialize, Serialize};
|
||
|
|
||
|
/// Represents an item, or if the quanity is zero an empty slot.
|
||
|
#[derive(Default, Copy, Clone, Serialize, Deserialize, Debug)]
|
||
|
pub struct Item {
|
||
|
pub quantity: u32,
|
||
|
pub id: u32,
|
||
|
}
|
||
|
|
||
|
impl Item {
|
||
|
pub fn new(quantity: u32, id: u32) -> Self {
|
||
|
Self { quantity, id }
|
||
|
}
|
||
|
}
|