Restore collision data for airships, and add the test that would have caught this.

This commit is contained in:
Avi Weinstock 2021-06-07 18:09:09 -04:00
parent 4147665cbb
commit 3cbf84ddb1

View File

@ -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<ShipSpec> = 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()
);
}
}
}