From 176b09fa0443f57fff7247dec45c944ca570b403 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Thu, 7 Nov 2024 15:56:00 -0600 Subject: [PATCH] Add additional features for aircraft config --- src/defs.ts | 6 ++++++ src/interface/aircraft.ts | 28 ++++++++++++++++++++++++++++ src/scripts/test.ts | 4 ++++ src/types/types.d.ts | 3 +++ 4 files changed, 41 insertions(+) create mode 100644 src/scripts/test.ts diff --git a/src/defs.ts b/src/defs.ts index 61056d0..cc30cb5 100644 --- a/src/defs.ts +++ b/src/defs.ts @@ -121,6 +121,12 @@ export enum AircraftFeature { WingLights = 6, Flaps = 7, APU = 8, + Doors = 9, + Seatbelts = 10, + EmergencyLights = 11, + AntiIce = 12, + Battery = 13, + Packs = 14, } /** The simtype for the rule file */ export enum AircraftConfigSimType { diff --git a/src/interface/aircraft.ts b/src/interface/aircraft.ts index 5c616a0..47c0703 100644 --- a/src/interface/aircraft.ts +++ b/src/interface/aircraft.ts @@ -135,4 +135,32 @@ export abstract class AircraftConfig { wingLights(...args: any): FeatureState { return null } + + apu(...args: any): FeatureState { + return null + } + + doors(...args: any): FeatureState { + return null + } + + seatbelts(...args: any): FeatureState { + return null + } + + emergencyLights(...args: any): FeatureState { + return null + } + + antiIce(...args: any): FeatureState { + return null + } + + battery(...args: any): FeatureState { + return null + } + + packs(...args: any): FeatureState { + return null + } } diff --git a/src/scripts/test.ts b/src/scripts/test.ts new file mode 100644 index 0000000..25a0ec6 --- /dev/null +++ b/src/scripts/test.ts @@ -0,0 +1,4 @@ +/** + * + */ +export default class ExampleScript {} diff --git a/src/types/types.d.ts b/src/types/types.d.ts index fc787dd..c675a5a 100644 --- a/src/types/types.d.ts +++ b/src/types/types.d.ts @@ -1,4 +1,5 @@ import { EngineType } from '../defs' +import { AircraftFeature } from '../defs' import { AircraftType } from '../defs' import { FlightPlanType } from '../defs' import { GateType } from '../defs' @@ -35,6 +36,8 @@ export interface Telemetry { engineRpm: RotationalSpeed /** The type of engine */ engineType: EngineType + /** A dictionary of the various aircraft features and their values */ + features: { [key in AircraftFeature]: boolean } /** Flap position, from 0 */ flaps: number /** The current fuel quantity (weight) */