Added skiff

This commit is contained in:
Joshua Barretto 2023-05-17 19:42:34 +01:00
parent 74d4fc8e64
commit 3c1cfe574d
6 changed files with 54 additions and 5 deletions

View File

@ -85,7 +85,7 @@
15: Air(Anvil, 2),
16: Air(Tent, 0),
17: Air(CookingPot, 0),
18: Air(WallLamp, 4),
18: Air(WallLampSmall, 4),
19: Air(Lantern, 4),
},
),
@ -125,4 +125,40 @@
19: Air(Lantern, 4),
},
),
Skiff: (
bone0: (
offset: (-3.5, -7, -0.5),
central: ("skiff.structure"),
),
bone1: (
offset: (0.0, 0.0, 0.0),
central: ("empty"),
),
bone2: (
offset: (0.0, 0.0, 0.0),
central: ("empty"),
),
bone3: (
offset: (0.0, 0.0, 0.0),
central: ("empty"),
),
custom_indices: {
1: Air(ChairSingle, 4),
2: Air(Helm, 0),
3: Air(Door, 4),
4: Air(Door, 0),
9: Air(CraftingBench, 0),
10: Air(Window1, 0),
11: Air(RepairBench, 0),
12: Air(DismantlingBench, 4),
13: Air(Window1, 2),
14: Air(Crate, 0),
15: Air(Cauldron, 2),
16: Air(Tent, 0),
17: Air(CookingPot, 0),
18: Air(WallLampSmall, 4),
19: Air(Lantern, 4),
},
),
})

BIN
assets/common/voxel/skiff/structure.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1097,6 +1097,7 @@ impl Body {
ship::Body::AirBalloon => [0.0, 0.0, 5.0],
ship::Body::SailBoat => [-2.0, -5.0, 4.0],
ship::Body::Galleon => [-2.0, -5.0, 4.0],
ship::Body::Skiff => [1.0, -2.0, 2.0],
ship::Body::Volume => [0.0, 0.0, 0.0],
},
_ => [0.0, 0.0, 0.0],

View File

@ -9,15 +9,16 @@ use serde::{Deserialize, Serialize};
use std::sync::Arc;
use vek::*;
pub const ALL_BODIES: [Body; 4] = [
pub const ALL_BODIES: [Body; 5] = [
Body::DefaultAirship,
Body::AirBalloon,
Body::SailBoat,
Body::Galleon,
Body::Skiff,
];
pub const ALL_AIRSHIPS: [Body; 2] = [Body::DefaultAirship, Body::AirBalloon];
pub const ALL_SHIPS: [Body; 2] = [Body::SailBoat, Body::Galleon];
pub const ALL_SHIPS: [Body; 3] = [Body::SailBoat, Body::Galleon, Body::Skiff];
make_case_elim!(
body,
@ -29,6 +30,7 @@ make_case_elim!(
SailBoat = 2,
Galleon = 3,
Volume = 4,
Skiff = 5,
}
);
@ -58,6 +60,7 @@ impl Body {
Body::AirBalloon => Some("air_balloon.structure"),
Body::SailBoat => Some("sail_boat.structure"),
Body::Galleon => Some("galleon.structure"),
Body::Skiff => Some("skiff.structure"),
Body::Volume => None,
}
}
@ -66,8 +69,9 @@ impl Body {
match self {
Body::DefaultAirship | Body::Volume => Vec3::new(25.0, 50.0, 40.0),
Body::AirBalloon => Vec3::new(25.0, 50.0, 40.0),
Body::SailBoat => Vec3::new(6.0, 17.0, 6.0),
Body::Galleon => Vec3::new(7.0, 32.0, 10.0),
Body::SailBoat => Vec3::new(12.0, 17.0, 6.0),
Body::Galleon => Vec3::new(14.0, 32.0, 10.0),
Body::Skiff => Vec3::new(7.0, 32.0, 10.0),
}
}

View File

@ -313,6 +313,7 @@ impl Vehicle {
comp::ship::Body::AirBalloon => 8.0,
comp::ship::Body::SailBoat => 5.0,
comp::ship::Body::Galleon => 6.0,
comp::ship::Body::Skiff => 6.0,
_ => 10.0,
}
}

View File

@ -95,6 +95,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
AirBalloon => (0.0, 0.0, 0.0),
SailBoat => (0.0, 0.0, 0.0),
Galleon => (0.0, 0.0, 0.0),
Skiff => (0.0, 0.0, 0.0),
Volume => (0.0, 0.0, 0.0),
},
bone1: match body {
@ -102,6 +103,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
AirBalloon => (0.0, 0.0, 0.0),
SailBoat => (0.0, 0.0, 0.0),
Galleon => (0.0, 0.0, 0.0),
Skiff => (0.0, 0.0, 0.0),
Volume => (0.0, 0.0, 0.0),
},
bone2: match body {
@ -109,6 +111,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
AirBalloon => (0.0, 0.0, 0.0),
SailBoat => (0.0, 0.0, 0.0),
Galleon => (0.0, 0.0, 0.0),
Skiff => (0.0, 0.0, 0.0),
Volume => (0.0, 0.0, 0.0),
},
bone3: match body {
@ -116,6 +119,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
AirBalloon => (0.0, -9.0, 8.0),
SailBoat => (0.0, 0.0, 0.0),
Galleon => (0.0, 0.0, 0.0),
Skiff => (0.0, 0.0, 0.0),
Volume => (0.0, 0.0, 0.0),
},
}