diff --git a/content/system.toml b/content/system.toml index 4ec0e49..73d3d66 100644 --- a/content/system.toml +++ b/content/system.toml @@ -13,6 +13,9 @@ object.earth.position.angle = 0 object.earth.position.z = 10.0 object.earth.size = 1000 +# TODO: satisfy conditions to land +object.earth.landable = true + object.luna.sprite = "planet::luna" object.luna.position.center = "earth" object.luna.position.radius = 1600 diff --git a/crates/content/src/part/system.rs b/crates/content/src/part/system.rs index 887cf00..85dc425 100644 --- a/crates/content/src/part/system.rs +++ b/crates/content/src/part/system.rs @@ -28,6 +28,7 @@ pub(crate) mod syntax { pub radius: Option, pub angle: Option, + pub landable: Option, } #[derive(Debug, Deserialize)] @@ -118,6 +119,9 @@ pub struct SystemObject { /// This object's sprite's angle, in radians pub angle: f32, + + /// If true, ships may land on this object + pub landable: bool, } /// Helper function for resolve_position, never called on its own. @@ -218,6 +222,7 @@ impl crate::Build for System { system_handle, body_index: 0, }, + landable: obj.landable.unwrap_or(false), }); }