Added `landable` key
parent
d014e085d5
commit
ac4eb7d67d
|
@ -13,6 +13,9 @@ object.earth.position.angle = 0
|
||||||
object.earth.position.z = 10.0
|
object.earth.position.z = 10.0
|
||||||
object.earth.size = 1000
|
object.earth.size = 1000
|
||||||
|
|
||||||
|
# TODO: satisfy conditions to land
|
||||||
|
object.earth.landable = true
|
||||||
|
|
||||||
object.luna.sprite = "planet::luna"
|
object.luna.sprite = "planet::luna"
|
||||||
object.luna.position.center = "earth"
|
object.luna.position.center = "earth"
|
||||||
object.luna.position.radius = 1600
|
object.luna.position.radius = 1600
|
||||||
|
|
|
@ -28,6 +28,7 @@ pub(crate) mod syntax {
|
||||||
|
|
||||||
pub radius: Option<f32>,
|
pub radius: Option<f32>,
|
||||||
pub angle: Option<f32>,
|
pub angle: Option<f32>,
|
||||||
|
pub landable: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
|
@ -118,6 +119,9 @@ pub struct SystemObject {
|
||||||
|
|
||||||
/// This object's sprite's angle, in radians
|
/// This object's sprite's angle, in radians
|
||||||
pub angle: f32,
|
pub angle: f32,
|
||||||
|
|
||||||
|
/// If true, ships may land on this object
|
||||||
|
pub landable: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function for resolve_position, never called on its own.
|
/// Helper function for resolve_position, never called on its own.
|
||||||
|
@ -218,6 +222,7 @@ impl crate::Build for System {
|
||||||
system_handle,
|
system_handle,
|
||||||
body_index: 0,
|
body_index: 0,
|
||||||
},
|
},
|
||||||
|
landable: obj.landable.unwrap_or(false),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue