diff --git a/assets/common/items/debug/admin_back.ron b/assets/common/items/debug/admin_back.ron new file mode 100644 index 0000000000..fc8f427533 --- /dev/null +++ b/assets/common/items/debug/admin_back.ron @@ -0,0 +1,9 @@ +Item( + name: "Admin's Cape", + description: "With great power comes + great responsibility. ", + kind: Armor( + kind: Back(Admin), + stats: (20), + ), +) diff --git a/assets/common/items/debug/admin_tabard.ron b/assets/common/items/debug/admin_tabard.ron new file mode 100644 index 0000000000..9ad427f3ed --- /dev/null +++ b/assets/common/items/debug/admin_tabard.ron @@ -0,0 +1,9 @@ +Item( + name: "Admin's Tabard", + description: "With great power comes + great responsibility. ", + kind: Armor( + kind: Tabard(Admin), + stats: (20), + ), +) diff --git a/assets/common/items/debug/green_0.ron b/assets/common/items/debug/green_0.ron new file mode 100644 index 0000000000..c37daf9b99 --- /dev/null +++ b/assets/common/items/debug/green_0.ron @@ -0,0 +1,8 @@ +Item( + name: "Lime Zest Lantern", + description: "It has an opening that could fit a ring...", + kind: Armor( + kind: Lantern(Green0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/leather_0.ron b/assets/common/items/debug/leather_0.ron new file mode 100644 index 0000000000..aa0ffd33d6 --- /dev/null +++ b/assets/common/items/debug/leather_0.ron @@ -0,0 +1,8 @@ +Item( + name: "Swift Leather Cap", + description: "WIP", + kind: Armor( + kind: Head(Leather0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/neck_0.ron b/assets/common/items/debug/neck_0.ron new file mode 100644 index 0000000000..4dbd32ae6f --- /dev/null +++ b/assets/common/items/debug/neck_0.ron @@ -0,0 +1,8 @@ +Item( + name: "Plain Necklace", + description: "WIP", + kind: Armor( + kind: Neck(Neck0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_belt.ron b/assets/common/items/debug/plate_belt.ron new file mode 100644 index 0000000000..2c18113d1a --- /dev/null +++ b/assets/common/items/debug/plate_belt.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Belt", + description: "WIP", + kind: Armor( + kind: Belt(Plate0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_chest.ron b/assets/common/items/debug/plate_chest.ron new file mode 100644 index 0000000000..92bb5fb664 --- /dev/null +++ b/assets/common/items/debug/plate_chest.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Chestplate", + description: "Arrows to the stomach are soooo last update.", + kind: Armor( + kind: Chest(PlateGreen0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_feet.ron b/assets/common/items/debug/plate_feet.ron new file mode 100644 index 0000000000..12f95dcd4e --- /dev/null +++ b/assets/common/items/debug/plate_feet.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Feet", + description: "WIP", + kind: Armor( + kind: Foot(Plate0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_hands.ron b/assets/common/items/debug/plate_hands.ron new file mode 100644 index 0000000000..1fdbb6d6da --- /dev/null +++ b/assets/common/items/debug/plate_hands.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Handguards", + description: "WIP", + kind: Armor( + kind: Hand(Plate0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_legs.ron b/assets/common/items/debug/plate_legs.ron new file mode 100644 index 0000000000..51c3620338 --- /dev/null +++ b/assets/common/items/debug/plate_legs.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Legguards", + description: "WIP", + kind: Armor( + kind: Pants(PlateGreen0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/plate_shoulder.ron b/assets/common/items/debug/plate_shoulder.ron new file mode 100644 index 0000000000..3323278ecb --- /dev/null +++ b/assets/common/items/debug/plate_shoulder.ron @@ -0,0 +1,8 @@ +Item( + name: "Iron Shoulderguards", + description: "A strong shoulder to lean on.", + kind: Armor( + kind: Shoulder(Plate0), + stats: (20), + ), +) diff --git a/assets/common/items/debug/ring_0.ron b/assets/common/items/debug/ring_0.ron new file mode 100644 index 0000000000..8544765246 --- /dev/null +++ b/assets/common/items/debug/ring_0.ron @@ -0,0 +1,8 @@ +Item( + name: "Scratched Ring", + description: "WIP", + kind: Armor( + kind: Ring(Ring0), + stats: (20), + ), +) diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index fcf2045e59..3811169c64 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -252,7 +252,7 @@ (0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.0, ), // Tabards - Armor(Tabard(Tabard0)): VoxTrans( + Armor(Tabard(Admin)): VoxTrans( "voxel.armor.tabard.tabard-0", (0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.0, ), diff --git a/common/src/comp/inventory/item/armor.rs b/common/src/comp/inventory/item/armor.rs index 233ad4a2f1..07516175f9 100644 --- a/common/src/comp/inventory/item/armor.rs +++ b/common/src/comp/inventory/item/armor.rs @@ -199,9 +199,9 @@ pub const ALL_HEADS: [Head; 2] = [Head::Leather0, Head::AssaMask0]; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] #[repr(u32)] pub enum Tabard { - Tabard0 = 1, + Admin = 1, } -pub const ALL_TABARDS: [Tabard; 1] = [Tabard::Tabard0]; +pub const ALL_TABARDS: [Tabard; 1] = [Tabard::Admin]; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Armor { diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index 54fe6554bd..7174c15e64 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -139,11 +139,11 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv Pants(_) => &mut loadout.pants, Foot(_) => &mut loadout.foot, Back(_) => &mut loadout.back, - Ring(_) => &mut loadout.back, - Neck(_) => &mut loadout.back, - Lantern(_) => &mut loadout.back, - Head(_) => &mut loadout.back, - Tabard(_) => &mut loadout.back, + Ring(_) => &mut loadout.ring, + Neck(_) => &mut loadout.neck, + Lantern(_) => &mut loadout.lantern, + Head(_) => &mut loadout.head, + Tabard(_) => &mut loadout.tabard, }; // Insert old item into inventory diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index e166c8a166..3fb33df9ac 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -333,7 +333,10 @@ impl<'a> Widget for Bag<'a> { slot_manager: Some(self.slot_manager), }; // Head - let (title, desc) = ("Helmet", ""); + let (title, desc) = loadout + .head + .as_ref() + .map_or(("Head", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Head, [45.0; 2]) .mid_top_with_margin_on(state.ids.bg_frame, 60.0) @@ -341,7 +344,10 @@ impl<'a> Widget for Bag<'a> { .with_tooltip(self.tooltip_manager, title, desc, &item_tooltip) .set(state.ids.head_slot, ui); // Necklace - let (title, desc) = ("Neck", ""); + let (title, desc) = loadout + .neck + .as_ref() + .map_or(("Neck", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Neck, [45.0; 2]) .mid_bottom_with_margin_on(state.ids.head_slot, -55.0) @@ -395,7 +401,7 @@ impl<'a> Widget for Bag<'a> { .set(state.ids.belt_slot, ui); // Legs let (title, desc) = loadout - .belt + .pants .as_ref() .map_or(("Legs", ""), |item| (item.name(), item.description())); slot_maker @@ -405,7 +411,10 @@ impl<'a> Widget for Bag<'a> { .with_tooltip(self.tooltip_manager, title, desc, &item_tooltip) .set(state.ids.legs_slot, ui); // Lantern - let (title, desc) = ("Lantern", ""); + let (title, desc) = loadout + .lantern + .as_ref() + .map_or(("Lantern", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Lantern, [45.0; 2]) .bottom_right_with_margins_on(state.ids.shoulders_slot, -55.0, 0.0) @@ -413,7 +422,10 @@ impl<'a> Widget for Bag<'a> { .with_tooltip(self.tooltip_manager, title, desc, &item_tooltip) .set(state.ids.lantern_slot, ui); // Ring - let (title, desc) = ("Ring", ""); + let (title, desc) = loadout + .ring + .as_ref() + .map_or(("Ring", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Ring, [45.0; 2]) .bottom_left_with_margins_on(state.ids.hands_slot, -55.0, 0.0) @@ -421,7 +433,10 @@ impl<'a> Widget for Bag<'a> { .with_tooltip(self.tooltip_manager, title, desc, &item_tooltip) .set(state.ids.ring_slot, ui); // Back - let (title, desc) = ("Back", ""); + let (title, desc) = loadout + .back + .as_ref() + .map_or(("Back", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Back, [45.0; 2]) .down_from(state.ids.lantern_slot, 10.0) @@ -440,7 +455,10 @@ impl<'a> Widget for Bag<'a> { .with_tooltip(self.tooltip_manager, title, desc, &item_tooltip) .set(state.ids.feet_slot, ui); // Tabard - let (title, desc) = ("Tabard", ""); + let (title, desc) = loadout + .tabard + .as_ref() + .map_or(("Tabard", ""), |item| (item.name(), item.description())); slot_maker .fabricate(ArmorSlot::Tabard, [70.0; 2]) .top_right_with_margins_on(state.ids.bg_frame, 80.5, 53.0)