starter equip

This commit is contained in:
Pfauenauge90 2020-04-08 17:38:34 +02:00
parent 6dcdd80ec8
commit 85f9f80024
9 changed files with 89 additions and 26 deletions

View File

@ -0,0 +1,8 @@
Item(
name: "Rugged Commoner's Pants",
description: "They remind you of the old days.",
kind: Armor(
kind: Pants(Rugged0),
stats: (20),
),
)

View File

@ -0,0 +1,8 @@
Item(
name: "Worn out Sandals",
description: "Loyal companions.",
kind: Armor(
kind: Foot(Sandal0),
stats: (20),
),
)

View File

@ -57,9 +57,17 @@
// Other
Utility(Collar): Png(
"element.icons.collar",
),
),
// Armor
// Starter Parts
Armor(Foot(Sandal0)): VoxTrans(
"voxel.armor.foot.cloth_sandals",
(0.0, 0.0, 0.0), (-95.0, 140.0, 0.0), 1.1,
),
Armor(Pants(Rugged0)): VoxTrans(
"voxel.armor.pants.rugged-0",
(0.0, 0.0, 0.0), (-90.0, 180.0, 0.0), 1.2,
),
// Assassin Set
Armor(Chest(Assassin)): VoxTrans(
"voxel.armor.chest.assa",

BIN
assets/voxygen/voxel/armor/pants/rugged-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -11,11 +11,7 @@
Assassin: (
vox_spec: ("armor.foot.assa", (-2.5, -3.5, -9.0)),
color: None
),
Sandal: (
vox_spec: ("armor.foot.cloth_sandals", (-2.5, -2.5, -9.0)),
color: None
),
),
Jester: (
vox_spec: ("armor.foot.dark_jester-elf_shoe", (-2.5, -3.0, -9.0)),
color: None
@ -40,5 +36,9 @@
vox_spec: ("armor.foot.cloth_green-0", (-2.5, -3.5, -9.0)),
color: None
),
Sandal0:(
vox_spec: ("armor.foot.cloth_sandals", (-2.5, -3.5, -9.0)),
color: None
),
},
))

View File

@ -52,5 +52,9 @@
vox_spec: ("armor.pants.cloth_green-0", (-5.0, -3.5, 0.0)),
color: None
),
Rugged0:(
vox_spec: ("armor.pants.rugged-0", (-5.0, -3.5, 1.0)),
color: None
),
},
))

View File

@ -76,8 +76,9 @@ pub enum Pants {
ClothPurple0 = 10,
ClothBlue0 = 11,
ClothGreen0 = 12,
Rugged0 = 13,
}
pub const ALL_PANTS: [Pants; 13] = [
pub const ALL_PANTS: [Pants; 14] = [
Pants::None,
Pants::Blue,
Pants::Brown,
@ -91,6 +92,7 @@ pub const ALL_PANTS: [Pants; 13] = [
Pants::ClothPurple0,
Pants::ClothBlue0,
Pants::ClothGreen0,
Pants::Rugged0,
];
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
@ -118,7 +120,7 @@ pub const ALL_HANDS: [Hand; 7] = [
#[repr(u32)]
pub enum Foot {
Dark = 1,
Sandal = 2,
Sandal0 = 2,
Jester = 3,
Assassin = 4,
Plate0 = 5,
@ -129,7 +131,7 @@ pub enum Foot {
}
pub const ALL_FEET: [Foot; 9] = [
Foot::Dark,
Foot::Sandal,
Foot::Sandal0,
Foot::Jester,
Foot::Assassin,
Foot::Plate0,

View File

@ -182,8 +182,12 @@ impl StateExt for State {
chest: None,
belt: None,
hand: None,
pants: None,
foot: None,
pants: Some(assets::load_expect_cloned(
"common.items.armor.starter.rugged_pants",
)),
foot: Some(assets::load_expect_cloned(
"common.items.armor.starter.sandals_0",
)),
back: None,
ring: None,
neck: None,

View File

@ -12,6 +12,7 @@ use crate::{
};
use client::Client;
use common::{
assets,
assets::load_expect,
comp::{self, humanoid},
};
@ -353,8 +354,12 @@ impl CharSelectionUi {
chest: None,
belt: None,
hand: None,
pants: None,
foot: None,
pants: Some(assets::load_expect_cloned(
"common.items.armor.starter.rugged_pants",
)),
foot: Some(assets::load_expect_cloned(
"common.items.armor.starter.sandals_0",
)),
back: None,
ring: None,
neck: None,
@ -364,18 +369,39 @@ impl CharSelectionUi {
};
Some(loadout)
},
Mode::Create { loadout, tool, .. } => {
loadout.active_item = tool.map(|tool| comp::ItemConfig {
item: (*load_expect::<comp::Item>(tool)).clone(),
ability1: None,
ability2: None,
ability3: None,
block_ability: None,
dodge_ability: None,
});
Some(loadout.clone())
},
}
Mode::Create (characterdata) =>
let loadout = comp::Loadout {
active_item: characterdata
.as_ref()
.and_then(|d| d.tool.as_ref())
.map(|tool| comp::ItemConfig {
item: (*load_expect::<comp::Item>(&tool)).clone(),
ability1: None,
ability2: None,
ability3: None,
block_ability: None,
dodge_ability: None,
}),
second_item: None,
shoulder: None,
chest: None,
belt: None,
hand: None,
pants: Some(assets::load_expect_cloned(
"common.items.armor.starter.rugged_pants",
)),
foot: Some(assets::load_expect_cloned(
"common.items.armor.starter.sandals_0",
)),
back: None,
ring: None,
neck: None,
lantern: None,
head: None,
tabard: None,
};
Some(loadout)
},
}
// TODO: Split this into multiple modules or functions.