diff --git a/src/equipment.rs b/src/equipment.rs index 75ad65f..4a5db00 100755 --- a/src/equipment.rs +++ b/src/equipment.rs @@ -21,10 +21,12 @@ pub enum Slot { Earring, /// The neck slot. Shorthand is "nek". Neck, - /// The ring slot. Shorthand is "rir". - Rings, /// The wrists slot. Shorthand is "wrs". Wrists, + /// The right ring slot. Shorthand is "ril". + RingLeft, + /// The left ring slot. Shorthand is "rir". + RingRight, } /// Returns the shorthand abbreviation of `slot`. For example, Body's shorthand is "top". @@ -37,8 +39,9 @@ pub fn get_slot_abbreviation(slot: Slot) -> &'static str { Slot::Body => "top", Slot::Earring => "ear", Slot::Neck => "nek", - Slot::Rings => "rir", Slot::Wrists => "wrs", + Slot::RingLeft => "ril", + Slot::RingRight => "rir", } } @@ -47,14 +50,15 @@ pub fn get_slot_abbreviation(slot: Slot) -> &'static str { pub fn get_slot_from_id(id: i32) -> Option { match id { 3 => Some(Slot::Head), + 4 => Some(Slot::Body), 5 => Some(Slot::Hands), 7 => Some(Slot::Legs), 8 => Some(Slot::Feet), - 4 => Some(Slot::Body), 9 => Some(Slot::Earring), 10 => Some(Slot::Neck), - 12 => Some(Slot::Rings), 11 => Some(Slot::Wrists), + 12 => Some(Slot::RingLeft), + 13 => Some(Slot::RingRight), _ => None, } } @@ -70,8 +74,9 @@ pub fn get_slot_from_abbreviation(abrev: &str) -> Option { "top" => Some(Slot::Body), "ear" => Some(Slot::Earring), "nek" => Some(Slot::Neck), - "rir" => Some(Slot::Rings), "wrs" => Some(Slot::Wrists), + "ril" => Some(Slot::RingLeft), + "rir" => Some(Slot::RingRight), _ => None, } }