Add frog npc, tweak pig model

This commit is contained in:
Snowram 2020-07-30 21:53:48 +02:00 committed by jshipsey
parent 2645f9e631
commit b37c0962af
23 changed files with 98 additions and 14 deletions

View File

@ -457,6 +457,10 @@
"truffler": {
"keyword": "truffler",
"generic": "Truffler"
},
"frog": {
"keyword": "frog",
"generic": "Frog"
}
}
},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,22 +9,22 @@
central: ("npc.pig.male.chest"),
),
tail: (
offset: (-2.5, -3.0, -0.0),
offset: (-2.0, -3.0, -0.0),
central: ("npc.pig.male.tail"),
),
),
(Pig, Female):(
head: (
offset: (-5.0, 0.0, -4.0),
central: ("npc.pig.female.head"),
central: ("npc.pig.male.head"),
),
chest: (
offset: (-5.0, -5.0, -3.5),
central: ("npc.pig.female.chest"),
central: ("npc.pig.male.chest"),
),
tail: (
offset: (-2.5, -3.0, -0.0),
central: ("npc.pig.female.tail"),
offset: (-2.0, -3.0, -0.0),
central: ("npc.pig.male.tail"),
),
),
@ -434,4 +434,32 @@
central: ("armor.empty"),
),
),
(Frog, Male):(
head: (
offset: (-3.5, 0.0, -3.0),
central: ("npc.frog.male.head"),
),
chest: (
offset: (-3.5, -5.0, -3.0),
central: ("npc.frog.male.chest"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
),
(Frog, Female):(
head: (
offset: (-3.5, 0.0, -3.0),
central: ("npc.frog.male.head"),
),
chest: (
offset: (-3.5, -5.0, -3.0),
central: ("npc.frog.male.chest"),
),
tail: (
offset: (0.0, 0.0, 0.0),
central: ("armor.empty"),
),
),
})

View File

@ -20,19 +20,19 @@
(Pig, Female): (
left_front: (
offset: (-1.0, -1.5, -5.0),
lateral: ("npc.pig.female.foot_fl"),
lateral: ("npc.pig.male.foot_fl"),
),
right_front: (
offset: (-1.0, -1.5, -5.0),
lateral: ("npc.pig.female.foot_fr"),
lateral: ("npc.pig.male.foot_fr"),
),
left_back: (
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.pig.female.foot_bl"),
lateral: ("npc.pig.male.foot_bl"),
),
right_back: (
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.pig.female.foot_br"),
lateral: ("npc.pig.male.foot_br"),
),
),
@ -557,4 +557,41 @@
lateral: ("npc.truffler.male.foot_br"),
),
),
(Frog, Male): (
left_front: (
offset: (-2.5, -2.5, -4.0),
lateral: ("npc.frog.male.foot_fl"),
),
right_front: (
offset: (-2.5, -2.5, -4.0),
lateral: ("npc.frog.male.foot_fr"),
),
left_back: (
offset: (-2.5, -3.5, -4.0),
lateral: ("npc.frog.male.foot_bl"),
),
right_back: (
offset: (-2.5, -3.5, -4.0),
lateral: ("npc.frog.male.foot_br"),
),
),
(Frog, Female): (
left_front: (
offset: (-2.5, -2.5, -4.0),
lateral: ("npc.frog.male.foot_fl"),
),
right_front: (
offset: (-2.5, -2.5, -4.0),
lateral: ("npc.frog.male.foot_fr"),
),
left_back: (
offset: (-2.5, -3.5, -4.0),
lateral: ("npc.frog.male.foot_bl"),
),
right_back: (
offset: (-2.5, -3.5, -4.0),
lateral: ("npc.frog.male.foot_br"),
),
),
})

View File

@ -43,6 +43,7 @@ pub enum Species {
Hyena = 12,
Rabbit = 13,
Truffler = 14,
Frog = 15,
}
/// Data representing per-species generic data.
@ -65,6 +66,7 @@ pub struct AllSpecies<SpeciesMeta> {
pub hyena: SpeciesMeta,
pub rabbit: SpeciesMeta,
pub truffler: SpeciesMeta,
pub frog: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -88,11 +90,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
Species::Hyena => &self.hyena,
Species::Rabbit => &self.rabbit,
Species::Truffler => &self.truffler,
Species::Frog => &self.frog,
}
}
}
pub const ALL_SPECIES: [Species; 15] = [
pub const ALL_SPECIES: [Species; 16] = [
Species::Pig,
Species::Fox,
Species::Sheep,
@ -108,6 +111,7 @@ pub const ALL_SPECIES: [Species; 15] = [
Species::Hyena,
Species::Rabbit,
Species::Truffler,
Species::Frog,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

View File

@ -132,9 +132,10 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (7.5, 2.0),
(Rabbit, _) => (4.0, 3.0),
(Truffler, _) => (7.5, -9.0),
(Frog, _) => (4.0, 2.0),
},
chest: match (body.species, body.body_type) {
(Pig, _) => (0.0, 7.0),
(Pig, _) => (0.0, 6.0),
(Fox, _) => (0.0, 8.0),
(Sheep, _) => (2.0, 7.0),
(Boar, _) => (0.0, 9.5),
@ -149,9 +150,10 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (-2.0, 9.0),
(Rabbit, _) => (-2.0, 6.0),
(Truffler, _) => (-2.0, 16.0),
(Frog, _) => (-2.0, 4.5),
},
feet_f: match (body.species, body.body_type) {
(Pig, _) => (4.5, 3.0, -2.0),
(Pig, _) => (4.5, 3.5, -1.0),
(Fox, _) => (3.0, 5.0, -5.5),
(Sheep, _) => (3.5, 2.0, -2.0),
(Boar, _) => (3.5, 6.0, -5.5),
@ -166,9 +168,10 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (2.5, 5.0, -4.0),
(Rabbit, _) => (3.0, 3.0, -3.0),
(Truffler, _) => (2.5, 5.0, -9.0),
(Frog, _) => (4.5, 6.5, 0.0),
},
feet_b: match (body.species, body.body_type) {
(Pig, _) => (3.5, -2.0, -1.5),
(Pig, _) => (3.5, -2.0, 0.0),
(Fox, _) => (3.0, -3.0, -3.0),
(Sheep, _) => (3.5, -3.5, -2.0),
(Boar, _) => (3.0, -3.0, -2.5),
@ -183,6 +186,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (3.0, -5.0, -2.5),
(Rabbit, _) => (3.5, -2.0, -1.0),
(Truffler, _) => (3.0, -5.0, -9.5),
(Frog, _) => (5.0, -3.5, 0.0),
},
tail: match (body.species, body.body_type) {
(Pig, _) => (-4.5, 2.5),
@ -199,7 +203,8 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Holladon, _) => (-1.0, 4.0),
(Hyena, _) => (-7.0, 0.0),
(Rabbit, _) => (-4.0, -0.0),
(Truffler, _) => (-7.0, 0.0),
(Truffler, _) => (0.0, 0.0),
(Frog, _) => (0.0, -0.0),
},
scaler: match (body.species, body.body_type) {
(Pig, _) => (0.9),
@ -217,6 +222,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.0),
(Rabbit, _) => (0.7),
(Truffler, _) => (1.0),
(Frog, _) => (0.7),
},
tempo: match (body.species, body.body_type) {
(Pig, _) => (1.0),
@ -234,6 +240,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.1),
(Rabbit, _) => (1.15),
(Truffler, _) => (1.0),
(Frog, _) => (1.15),
},
maximize: match (body.species, body.body_type) {
(Pig, _) => (1.0),
@ -251,6 +258,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.4),
(Rabbit, _) => (1.3),
(Truffler, _) => (1.0),
(Frog, _) => (1.3),
},
minimize: match (body.species, body.body_type) {
(Pig, _) => (0.6),
@ -268,6 +276,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.4),
(Rabbit, _) => (0.8),
(Truffler, _) => (1.0),
(Frog, _) => (0.8),
},
spring: match (body.species, body.body_type) {
(Pig, _) => (1.0),
@ -285,6 +294,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.4),
(Rabbit, _) => (2.5),
(Truffler, _) => (0.8),
(Frog, _) => (2.5),
},
feed: match (body.species, body.body_type) {
(Pig, _) => (1.0),
@ -302,6 +312,7 @@ impl<'a> From<&'a comp::quadruped_small::Body> for SkeletonAttr {
(Hyena, _) => (1.0),
(Rabbit, _) => (1.2),
(Truffler, _) => (0.6),
(Frog, _) => (1.2),
},
}
}