From 3cbf84ddb14027454c1ca3263a97c5ad5407687a Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Mon, 7 Jun 2021 18:09:09 -0400 Subject: [PATCH] Restore collision data for airships, and add the test that would have caught this. --- common/src/comp/body/ship.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/common/src/comp/body/ship.rs b/common/src/comp/body/ship.rs index 7e5d71d750..09bae038e0 100644 --- a/common/src/comp/body/ship.rs +++ b/common/src/comp/body/ship.rs @@ -33,8 +33,8 @@ impl Body { pub fn manifest_entry(&self) -> &'static str { match self { - Body::DefaultAirship => "Human_Airship", - Body::AirBalloon => "Air_Balloon", + Body::DefaultAirship => "airship_human.structure", + Body::AirBalloon => "air_balloon.structure", } } @@ -176,4 +176,17 @@ pub mod figuredata { // like a hard problem if they're not the same manifest) pub static ref VOXEL_COLLIDER_MANIFEST: AssetHandle = AssetExt::load_expect("server.manifests.ship_manifest"); } + + #[test] + fn test_ship_manifest_entries() { + for body in super::ALL_BODIES { + assert!( + VOXEL_COLLIDER_MANIFEST + .read() + .colliders + .get(body.manifest_entry()) + .is_some() + ); + } + } }