mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove None variant fromm armor types
This commit is contained in:
parent
f551c4a2c5
commit
d3b5b1e637
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Belt(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Belt(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Belt(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Belt(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Swift like the wind.",
|
||||
kind: Armor(
|
||||
kind: Belt(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Belt(Plate0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Chest(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Chest(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Chest(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Chest(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Swift like the wind.",
|
||||
kind: Armor(
|
||||
kind: Chest(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Arrows to the stomach are soooo last update.",
|
||||
kind: Armor(
|
||||
kind: Chest(PlateGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Foot(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Foot(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Foot(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Soft and warm",
|
||||
kind: Armor(
|
||||
kind: Foot(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Swift like the wind.",
|
||||
kind: Armor(
|
||||
kind: Foot(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Foot(Plate0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Hand(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Hand(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Hand(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Hand(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Swift like the wind.",
|
||||
kind: Armor(
|
||||
kind: Hand(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Hand(Plate0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Pants(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Pants(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Pants(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Pants(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "",
|
||||
kind: Armor(
|
||||
kind: Pants(Green),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "",
|
||||
kind: Armor(
|
||||
kind: Pants(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Pants(PlateGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Only the best for a member of the creed.",
|
||||
kind: Armor(
|
||||
kind: Shoulder(Assassin),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Shoulder(ClothBlue0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Shoulder(ClothGreen0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "WIP",
|
||||
kind: Armor(
|
||||
kind: Shoulder(ClothPurple0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "",
|
||||
kind: Armor(
|
||||
kind: Shoulder(Leather0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "Swift like the wind.",
|
||||
kind: Armor(
|
||||
kind: Shoulder(Leather1),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -3,6 +3,6 @@ Item(
|
||||
description: "A strong shoulder to lean on.",
|
||||
kind: Armor(
|
||||
kind: Shoulder(Plate0),
|
||||
stats: 20,
|
||||
stats: (20),
|
||||
),
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
\n
|
||||
Power: 20",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Hammer(BasicHammer),
|
||||
equip_time_millis: 500,
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ Item(
|
||||
name: "A Shield",
|
||||
description: "Legends tell this item is useless.",
|
||||
kind: Tool (
|
||||
ToolData (
|
||||
(
|
||||
kind: Shield(BasicShield),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ Item(
|
||||
description: "
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Sword(Short0),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 6",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Staff(BasicStaff),
|
||||
equip_time_millis: 200,
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ Item(
|
||||
description: " Infused by the power of Nature.
|
||||
Power: 25",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Staff(Sceptre),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Axe(BasicAxe),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Bow(BasicBow),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Dagger(BasicDagger),
|
||||
equip_time_millis: 300,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Hammer(BasicHammer),
|
||||
equip_time_millis: 500,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 20",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Staff(BasicStaff),
|
||||
equip_time_millis: 300,
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ Item(
|
||||
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Sword(BasicSword),
|
||||
equip_time_millis: 300,
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ Item(
|
||||
description: "
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Sword(WoodTraining),
|
||||
equip_time_millis: 400,
|
||||
)
|
||||
|
@ -3,7 +3,7 @@ Item(
|
||||
description: "
|
||||
Power: 15",
|
||||
kind: Tool(
|
||||
ToolData (
|
||||
(
|
||||
kind: Sword(Zweihander0),
|
||||
equip_time_millis: 500,
|
||||
)
|
||||
|
@ -1,8 +1,9 @@
|
||||
({
|
||||
None:(
|
||||
((
|
||||
default:(
|
||||
vox_spec: ("armor.belt.belt_none", (-5.0, -3.5, 2.0)),
|
||||
color: None
|
||||
),
|
||||
map: {
|
||||
Dark:(
|
||||
vox_spec: ("armor.belt.dark", (-4.0, -3.5, 2.0)),
|
||||
color: None
|
||||
@ -47,5 +48,5 @@
|
||||
vox_spec: ("armor.belt.cloth_green-0", (-5.0, -3.5, 2.0)),
|
||||
color: None
|
||||
),
|
||||
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,8 +1,9 @@
|
||||
({
|
||||
None: (
|
||||
((
|
||||
default: (
|
||||
vox_spec: ("armor.chest.chest_none", (-7.0, -3.5, 2.0)),
|
||||
color: None
|
||||
),
|
||||
map: {
|
||||
Blue: (
|
||||
vox_spec: ("armor.chest.grayscale", (-7.0, -3.5, 2.0)),
|
||||
color: Some((44, 74, 109))
|
||||
@ -55,5 +56,5 @@
|
||||
vox_spec: ("armor.chest.cloth_green-0", (-7.0, -3.5, 1.0)),
|
||||
color: None
|
||||
),
|
||||
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,8 +1,9 @@
|
||||
({
|
||||
Bare: (
|
||||
((
|
||||
default: (
|
||||
vox_spec: ("armor.foot.foot_none", (-2.5, -3.5, -9.0)),
|
||||
color: None
|
||||
),
|
||||
map: {
|
||||
Dark: (
|
||||
vox_spec: ("armor.foot.dark-0", (-2.5, -3.5, -9.0)),
|
||||
color: None
|
||||
@ -39,4 +40,5 @@
|
||||
vox_spec: ("armor.foot.cloth_green-0", (-2.5, -3.5, -9.0)),
|
||||
color: None
|
||||
),
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,5 +1,5 @@
|
||||
({
|
||||
Bare: (
|
||||
((
|
||||
default: (
|
||||
left: (
|
||||
vox_spec: ("armor.hand.hand_right_none", (-1.5, -1.5, -7.0)),
|
||||
color: None
|
||||
@ -9,6 +9,7 @@
|
||||
color: None
|
||||
)
|
||||
),
|
||||
map: {
|
||||
Assassin: (
|
||||
left: (
|
||||
vox_spec: ("armor.hand.assa_right", (-1.5, -1.5, -7.0)),
|
||||
@ -79,4 +80,5 @@
|
||||
color: None
|
||||
)
|
||||
),
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,8 +1,9 @@
|
||||
({
|
||||
None: (
|
||||
((
|
||||
default: (
|
||||
vox_spec: ("armor.pants.pants_none", (-5.0, -3.5, 1.0)),
|
||||
color: Some((28, 66, 109))
|
||||
),
|
||||
map: {
|
||||
Blue: (
|
||||
vox_spec: ("armor.pants.grayscale", (-5.0, -3.5, 1.0)),
|
||||
color: Some((28, 66, 109))
|
||||
@ -51,4 +52,5 @@
|
||||
vox_spec: ("armor.pants.cloth_green-0", (-5.0, -3.5, 0.0)),
|
||||
color: None
|
||||
),
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,6 +1,6 @@
|
||||
({
|
||||
((
|
||||
//This shouldn't be the none option, but what is?
|
||||
None: (
|
||||
default: (
|
||||
left: (
|
||||
vox_spec: ("armor.empty", (-3.0, -3.5, 1.0)),
|
||||
color: None
|
||||
@ -10,6 +10,7 @@
|
||||
color: None
|
||||
)
|
||||
),
|
||||
map: {
|
||||
Brown1: (
|
||||
left: (
|
||||
vox_spec: ("armor.shoulder.brown_right", (-3.0, -3.5, 1.0)),
|
||||
@ -110,4 +111,5 @@
|
||||
color: None
|
||||
)
|
||||
),
|
||||
})
|
||||
},
|
||||
))
|
||||
|
@ -1,7 +1,6 @@
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[repr(u32)]
|
||||
pub enum Chest {
|
||||
None = 0,
|
||||
Blue = 1,
|
||||
Brown = 2,
|
||||
Dark = 3,
|
||||
@ -16,8 +15,7 @@ pub enum Chest {
|
||||
ClothBlue0 = 12,
|
||||
ClothGreen0 = 13,
|
||||
}
|
||||
pub const ALL_CHESTS: [Chest; 14] = [
|
||||
Chest::None,
|
||||
pub const ALL_CHESTS: [Chest; 13] = [
|
||||
Chest::Blue,
|
||||
Chest::Brown,
|
||||
Chest::Dark,
|
||||
@ -98,7 +96,6 @@ pub const ALL_PANTS: [Pants; 13] = [
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[repr(u32)]
|
||||
pub enum Hand {
|
||||
Bare = 0,
|
||||
Cloth = 1,
|
||||
Assassin = 2,
|
||||
Plate0 = 3,
|
||||
@ -107,8 +104,7 @@ pub enum Hand {
|
||||
ClothBlue0 = 6,
|
||||
ClothGreen0 = 7,
|
||||
}
|
||||
pub const ALL_HANDS: [Hand; 8] = [
|
||||
Hand::Bare,
|
||||
pub const ALL_HANDS: [Hand; 7] = [
|
||||
Hand::Cloth,
|
||||
Hand::Assassin,
|
||||
Hand::Plate0,
|
||||
@ -121,7 +117,6 @@ pub const ALL_HANDS: [Hand; 8] = [
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[repr(u32)]
|
||||
pub enum Foot {
|
||||
Bare = 0,
|
||||
Dark = 1,
|
||||
Sandal = 2,
|
||||
Jester = 3,
|
||||
@ -132,8 +127,7 @@ pub enum Foot {
|
||||
ClothBlue0 = 8,
|
||||
ClothGreen0 = 9,
|
||||
}
|
||||
pub const ALL_FEET: [Foot; 10] = [
|
||||
Foot::Bare,
|
||||
pub const ALL_FEET: [Foot; 9] = [
|
||||
Foot::Dark,
|
||||
Foot::Sandal,
|
||||
Foot::Jester,
|
||||
@ -148,7 +142,6 @@ pub const ALL_FEET: [Foot; 10] = [
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[repr(u32)]
|
||||
pub enum Shoulder {
|
||||
None = 0,
|
||||
Brown1 = 1,
|
||||
Chain = 2,
|
||||
Assassin = 3,
|
||||
@ -159,8 +152,7 @@ pub enum Shoulder {
|
||||
ClothBlue0 = 8,
|
||||
ClothGreen0 = 9,
|
||||
}
|
||||
pub const ALL_SHOULDERS: [Shoulder; 10] = [
|
||||
Shoulder::None,
|
||||
pub const ALL_SHOULDERS: [Shoulder; 9] = [
|
||||
Shoulder::Brown1,
|
||||
Shoulder::Chain,
|
||||
Shoulder::Assassin,
|
||||
|
@ -234,19 +234,26 @@ impl HumHeadSpec {
|
||||
// Armor spects should be in the same order, top to bottom.
|
||||
// These seem overly split up, but wanted to keep the armor seperated
|
||||
// unlike head which is done above.
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorShoulderSpec(HashMap<Shoulder, SidedArmorVoxSpec>);
|
||||
pub struct ArmorVoxSpecMap<K, S>
|
||||
where
|
||||
K: std::hash::Hash + std::cmp::Eq,
|
||||
{
|
||||
default: S,
|
||||
map: HashMap<K, S>,
|
||||
}
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorChestSpec(HashMap<Chest, ArmorVoxSpec>);
|
||||
pub struct HumArmorShoulderSpec(ArmorVoxSpecMap<Shoulder, SidedArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorHandSpec(HashMap<Hand, SidedArmorVoxSpec>);
|
||||
pub struct HumArmorChestSpec(ArmorVoxSpecMap<Chest, ArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorBeltSpec(HashMap<Belt, ArmorVoxSpec>);
|
||||
pub struct HumArmorHandSpec(ArmorVoxSpecMap<Hand, SidedArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorPantsSpec(HashMap<Pants, ArmorVoxSpec>);
|
||||
pub struct HumArmorBeltSpec(ArmorVoxSpecMap<Belt, ArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorFootSpec(HashMap<Foot, ArmorVoxSpec>);
|
||||
pub struct HumArmorPantsSpec(ArmorVoxSpecMap<Pants, ArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumArmorFootSpec(ArmorVoxSpecMap<Foot, ArmorVoxSpec>);
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HumMainWeaponSpec(HashMap<ToolKind, ArmorVoxSpec>);
|
||||
|
||||
@ -307,22 +314,20 @@ impl HumArmorShoulderSpec {
|
||||
}
|
||||
|
||||
fn mesh_shoulder(&self, body: &Body, loadout: &Loadout, flipped: bool) -> Mesh<FigurePipeline> {
|
||||
let shoulder = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Shoulder(shoulder),
|
||||
..
|
||||
}) = loadout.shoulder.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
shoulder
|
||||
} else {
|
||||
&Shoulder::None
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&shoulder) {
|
||||
match self.0.map.get(&shoulder) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No shoulder specification exists for {:?}", shoulder);
|
||||
return load_mesh("not_found", Vec3::new(-3.0, -3.5, 0.1));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let shoulder_segment = color_segment(
|
||||
@ -366,22 +371,20 @@ impl HumArmorChestSpec {
|
||||
}
|
||||
|
||||
pub fn mesh_chest(&self, body: &Body, loadout: &Loadout) -> Mesh<FigurePipeline> {
|
||||
let chest = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Chest(chest),
|
||||
..
|
||||
}) = loadout.chest.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
chest
|
||||
} else {
|
||||
&Chest::None
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&chest) {
|
||||
match self.0.map.get(&chest) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No chest specification exists for {:?}", loadout.chest);
|
||||
return load_mesh("not_found", Vec3::new(-7.0, -3.5, 2.0));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let color = |mat_segment| {
|
||||
@ -419,22 +422,20 @@ impl HumArmorHandSpec {
|
||||
}
|
||||
|
||||
fn mesh_hand(&self, body: &Body, loadout: &Loadout, flipped: bool) -> Mesh<FigurePipeline> {
|
||||
let hand = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Hand(hand),
|
||||
..
|
||||
}) = loadout.hand.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
hand
|
||||
} else {
|
||||
&Hand::Bare
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&hand) {
|
||||
match self.0.map.get(&hand) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No hand specification exists for {:?}", hand);
|
||||
return load_mesh("not_found", Vec3::new(-1.5, -1.5, -7.0));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let hand_segment = color_segment(
|
||||
@ -473,22 +474,20 @@ impl HumArmorBeltSpec {
|
||||
}
|
||||
|
||||
pub fn mesh_belt(&self, body: &Body, loadout: &Loadout) -> Mesh<FigurePipeline> {
|
||||
let belt = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Belt(belt),
|
||||
..
|
||||
}) = loadout.belt.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
belt
|
||||
} else {
|
||||
&Belt::None
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&belt) {
|
||||
match self.0.map.get(&belt) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No belt specification exists for {:?}", belt);
|
||||
return load_mesh("not_found", Vec3::new(-4.0, -3.5, 2.0));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let belt_segment = color_segment(
|
||||
@ -509,22 +508,20 @@ impl HumArmorPantsSpec {
|
||||
}
|
||||
|
||||
pub fn mesh_pants(&self, body: &Body, loadout: &Loadout) -> Mesh<FigurePipeline> {
|
||||
let pants = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Pants(pants),
|
||||
..
|
||||
}) = loadout.pants.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
pants
|
||||
} else {
|
||||
&Pants::None
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&pants) {
|
||||
match self.0.map.get(&pants) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No pants specification exists for {:?}", pants);
|
||||
return load_mesh("not_found", Vec3::new(-5.0, -3.5, 1.0));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let color = |mat_segment| {
|
||||
@ -562,22 +559,20 @@ impl HumArmorFootSpec {
|
||||
}
|
||||
|
||||
fn mesh_foot(&self, body: &Body, loadout: &Loadout, flipped: bool) -> Mesh<FigurePipeline> {
|
||||
let foot = if let Some(ItemKind::Armor {
|
||||
let spec = if let Some(ItemKind::Armor {
|
||||
kind: Armor::Foot(foot),
|
||||
..
|
||||
}) = loadout.foot.as_ref().map(|i| &i.kind)
|
||||
{
|
||||
foot
|
||||
} else {
|
||||
&Foot::Bare
|
||||
};
|
||||
|
||||
let spec = match self.0.get(&foot) {
|
||||
match self.0.map.get(&foot) {
|
||||
Some(spec) => spec,
|
||||
None => {
|
||||
error!("No foot specification exists for {:?}", foot);
|
||||
return load_mesh("not_found", Vec3::new(-2.5, -3.5, -9.0));
|
||||
},
|
||||
}
|
||||
} else {
|
||||
&self.0.default
|
||||
};
|
||||
|
||||
let foot_segment = color_segment(
|
||||
|
Loading…
Reference in New Issue
Block a user