Skip to content

Commit

Permalink
Merge pull request #51 from rHermes/add-tag-to-inventory
Browse files Browse the repository at this point in the history
Add tag to inventory
  • Loading branch information
dank authored Apr 12, 2020
2 parents 9052a90 + 36f18c7 commit de1469d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ pub struct Upd {
pub buy_restriction_current: Option<u64>,
/// Key info
pub key: Option<UpdKey>,
/// Tag info
pub tag: Option<UpdTag>,
}

/// Medkit item info
Expand Down Expand Up @@ -132,6 +134,16 @@ pub struct UpdKey {
pub number_of_usages: u64,
}

/// Tag info
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
#[serde(rename_all = "PascalCase")]
pub struct UpdTag {
/// Color
pub color: u64,
/// Name
pub name: String,
}

/// Inventory item for trading.
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
pub struct BarterItem {
Expand Down

0 comments on commit de1469d

Please sign in to comment.