- Create binding for FlightPlan mod: https://forum.kerbalspaceprogram.com/index.php?/topic/216393-flight-plan/
use { Vessel } from ksp::vessel
use { flight_plan } from ksp::addons
use { CONSOLE } from ksp::console
use { current_time } from ksp::game
pub fn main_flight(vessel: Vessel) -> Result<Unit, string> = {
const fp = flight_plan().ok_or("Flight plan not available")?
CONSOLE.print_line("FP: Version " + fp.version)
fp.circularize(current_time() + 300)
}
Note: There is also an update to the VSCode plugin which is build around a LSP server (to2-syntax-0.0.3.vsix). If you encounter problems with that just switch back to the 0.0.1 version.