added chest drops

This commit is contained in:
Pfauenauge90 2020-03-20 01:11:02 +01:00
parent bb76cc37bd
commit 6094e4b017
12 changed files with 60 additions and 25 deletions

View File

@ -1,6 +1,6 @@
Item(
name: "Swift Belt",
description: "",
description: "Swift like the wind.",
kind: Armor(
kind: Belt(Leather0),
stats: 20,

View File

@ -1,6 +1,6 @@
Item(
name: "Swift Chest",
description: "",
description: "Swift like the wind.",
kind: Armor(
kind: Chest(Leather0),
stats: 20,

View File

@ -1,6 +1,6 @@
Item(
name: "Swift Boots",
description: "",
description: "Swift like the wind.",
kind: Armor(
kind: Foot(Leather0),
stats: 20,

View File

@ -1,6 +1,6 @@
Item(
name: "Swift Shoulderpads",
description: "",
description: "Swift like the wind.",
kind: Armor(
kind: Shoulder(Leather1),
stats: 20,

Binary file not shown.

BIN
assets/voxygen/element/icons/2hsword_slash.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -19,7 +19,7 @@
(0.0, 9.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
),
Tool(Sword(BasicSword)): VoxTrans(
"voxel.weapon.sword.weapon.sword.rusty_2h",
"voxel.weapon.sword.rusty_2h",
(0.0, 9.0, 0.0), (-90.0, 90.0, 0.0), 2.4,
),
Tool(Sword(Zweihander0)): VoxTrans(
@ -67,15 +67,15 @@
),
Armor(Belt(Assassin)): VoxTrans(
"voxel.armor.belt.assa",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.1,
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.8,
),
Armor(Foot(Assassin)): VoxTrans(
"voxel.armor.foot.assa",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.2,
(0.0, 0.0, 0.0), (-95.0, 140.0, 0.0), 1.1,
),
Armor(Hand(Assassin)): VoxTrans(
"voxel.armor.hand.assa_left",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.2,
(0.0, -1.0, 0.0), (-90.0, 135.0, 0.0), 1.0,
),
Armor(Shoulder(Assassin)): VoxTrans(
"voxel.armor.shoulder.assa_left",
@ -92,15 +92,15 @@
),
Armor(Belt(Plate0)): VoxTrans(
"voxel.armor.belt.plate-0",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.1,
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.8,
),
Armor(Foot(Plate0)): VoxTrans(
"voxel.armor.foot.plate-0",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.2,
(0.0, 0.0, 0.0), (-95.0, 140.0, 0.0), 1.1,
),
Armor(Hand(Plate0)): VoxTrans(
"voxel.armor.hand.plate_left-0",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.2,
(0.0, -1.0, 0.0), (-90.0, 135.0, 0.0), 1.0,
),
Armor(Shoulder(Plate0)): VoxTrans(
"voxel.armor.shoulder.plate_left-0",
@ -130,6 +130,10 @@
Armor(Shoulder(Leather1)): VoxTrans(
"voxel.armor.shoulder.leather_left-1",
(0.0, 0.0, 0.0), (-90.0, 130.0, 0.0), 1.2,
),
Armor(Shoulder(Leather0)): VoxTrans(
"voxel.armor.shoulder.leather_left-0",
(0.0, 0.0, 0.0), (-90.0, 130.0, 0.0), 1.2,
),
// Consumables
Consumable(Apple): VoxTrans(

View File

@ -16,7 +16,7 @@
color: None
),
Sword(Short0): (
vox_spec: ("weapon.sword.short_2h-0", (-2.0, -6.5, -1.0)),
vox_spec: ("weapon.sword.short_2h-0", (-1.5, -6.5, -1.0)),
color: None
),
Axe(BasicAxe): (

View File

@ -290,6 +290,19 @@ impl Item {
"common.items.weapons.starter_hammer",
"common.items.weapons.starter_bow",
"common.items.weapons.starter_staff",
"common.items.armor.belt.plate_0",
"common.items.armor.belt.leather_0",
"common.items.armor.chest.plate_green_0",
"common.items.armor.chest.leather_0",
"common.items.armor.foot.plate_0",
"common.items.armor.foot.leather_0",
"common.items.armor.pants.plate_green_0",
"common.items.armor.belt.leather_0",
"common.items.armor.shoulder.plate_0",
"common.items.armor.shoulder.leather_1",
"common.items.armor.shoulder.leather_0",
"common.items.weapons.wood_sword",
"common.items.weapons.short_sword_0",
]
.choose(&mut rand::thread_rng())
.unwrap(), // Can't fail

View File

@ -277,7 +277,7 @@ impl Inventory {
impl Default for Inventory {
fn default() -> Inventory {
let mut inventory = Inventory {
slots: vec![None; 200],
slots: vec![None; 18],
};
inventory.push(assets::load_expect_cloned("common.items.cheese"));
inventory.push(assets::load_expect_cloned("common.items.apple"));

View File

@ -184,7 +184,7 @@ impl<'a> Widget for Bag<'a> {
let space_max = 0;
let bag_space = format!("{}/{}", space_used, space_max);
let level = (self.stats.level.level()).to_string();
let currency = 999999; // TODO: Add as a Stat maybe?
let currency = 0; // TODO: Add as a Stat maybe?
// Tooltips
let item_tooltip = Tooltip::new({

View File

@ -699,7 +699,7 @@ impl<'a> Widget for Skillbar<'a> {
Button::image(
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
ToolKind::Sword(_) => self.imgs.twohsword_m2,
ToolKind::Sword(_) => self.imgs.charge,
ToolKind::Hammer(_) => self.imgs.twohhammer_m2,
ToolKind::Axe(_) => self.imgs.twohaxe_m2,
ToolKind::Bow(_) => self.imgs.bow_m2,
@ -731,6 +731,21 @@ impl<'a> Widget for Skillbar<'a> {
},
)
.middle_of(state.ids.m2_slot_bg)
.color(
match self.loadout.active_item.as_ref().map(|i| &i.item.kind) {
Some(ItemKind::Tool(ToolData { kind, .. })) => match kind {
ToolKind::Sword(_) => {
if self.energy.current() as f64 >= 200.0 {
Color::Rgba(1.0, 1.0, 1.0, 1.0)
} else {
Color::Rgba(0.4, 0.4, 0.4, 1.0)
}
},
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
},
_ => Color::Rgba(1.0, 1.0, 1.0, 1.0),
},
)
.set(state.ids.m2_content, ui);
//Slot 5
Image::new(self.imgs.skillbar_slot)
@ -808,15 +823,15 @@ impl<'a> Widget for Skillbar<'a> {
.middle_of(state.ids.slot1)
.set(state.ids.slot1_bg, ui);
// TODO: Changeable slot image
Image::new(self.imgs.charge)
.w_h(18.0 * scale, 18.0 * scale)
.color(if self.energy.current() as f64 >= 200.0 {
Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))
} else {
Some(Color::Rgba(0.4, 0.4, 0.4, 1.0))
})
.middle_of(state.ids.slot1_bg)
.set(state.ids.slot1_icon, ui);
/*Image::new(self.imgs.charge)
.w_h(18.0 * scale, 18.0 * scale)
.color(if self.energy.current() as f64 >= 200.0 {
Some(Color::Rgba(1.0, 1.0, 1.0, 1.0))
} else {
Some(Color::Rgba(0.4, 0.4, 0.4, 1.0))
})
.middle_of(state.ids.slot1_bg)
.set(state.ids.slot1_icon, ui);*/
// Slot 6
Image::new(self.imgs.skillbar_slot)
.w_h(20.0 * scale, 20.0 * scale)