This commit is contained in:
Pfauenauge90 2020-04-07 20:12:51 +02:00
parent 156b554023
commit ca667fd02b
16 changed files with 131 additions and 15 deletions

View File

@ -0,0 +1,9 @@
Item(
name: "Admin's Cape",
description: "With great power comes
great responsibility. ",
kind: Armor(
kind: Back(Admin),
stats: (20),
),
)

View File

@ -0,0 +1,9 @@
Item(
name: "Admin's Tabard",
description: "With great power comes
great responsibility. ",
kind: Armor(
kind: Tabard(Admin),
stats: (20),
),
)

View File

@ -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),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Swift Leather Cap",
description: "WIP",
kind: Armor(
kind: Head(Leather0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Plain Necklace",
description: "WIP",
kind: Armor(
kind: Neck(Neck0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Belt",
description: "WIP",
kind: Armor(
kind: Belt(Plate0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Chestplate",
description: "Arrows to the stomach are soooo last update.",
kind: Armor(
kind: Chest(PlateGreen0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Feet",
description: "WIP",
kind: Armor(
kind: Foot(Plate0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Handguards",
description: "WIP",
kind: Armor(
kind: Hand(Plate0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Legguards",
description: "WIP",
kind: Armor(
kind: Pants(PlateGreen0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Iron Shoulderguards",
description: "A strong shoulder to lean on.",
kind: Armor(
kind: Shoulder(Plate0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Scratched Ring",
description: "WIP",
kind: Armor(
kind: Ring(Ring0),
stats: (20),
),
)

View File

@ -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,
),

View File

@ -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 {

View File

@ -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

View File

@ -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)