msfs-simconnect-api-wrapper
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -222,2 +222,3 @@ import { | ||
const { handle } = this; | ||
propName = propName.replaceAll(`_`, ` `); | ||
const DATA_ID = this.nextId(); | ||
@@ -224,0 +225,0 @@ const def = SimVars[propName]; |
{ | ||
"name": "msfs-simconnect-api-wrapper", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A convenient SimConnect API for playing with Microsoft Flight Simulator 2020", | ||
@@ -5,0 +5,0 @@ "main": "msfs-api.js", |
@@ -63,3 +63,3 @@ # msfs-simconnect-api-wrapper | ||
- `schedule(handler, interval, ...propNames)`, sets up a periodic call to `handler` every `interval` milliseconds with the result of `get(...propNames)`. Returns an arg-less `off()` to end the scheduled call. | ||
- `set(propName, value)`, accepts a single simvar and the value its should be set to. This will throw for simvars that are not settable. | ||
- `set(propName, value)`, accepts a single simvar and the value its should be set to. This will throw "SimVar ... is not settable" when attempting to set the value for a read-only variable. | ||
- `trigger(triggerName, value?)`, triggers a simconnect event, with optional value. | ||
@@ -66,0 +66,0 @@ |
@@ -33,2 +33,4 @@ // See https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Simulation_Variables.htm | ||
Object.entries(SimVars).forEach(([key,value]) => (value.name = key)); | ||
// Make sure that variables that use a :number suffix resolve | ||
@@ -35,0 +37,0 @@ // to the ":index" definition for that variable, and to make |
@@ -15,3 +15,3 @@ import { SimConnectDataType } from "node-simconnect"; | ||
: function () { | ||
throw new Error(`SimVar "${propName}" is not settable`); | ||
throw new Error(`SimVar "${this.name}" is not settable`); | ||
}, | ||
@@ -18,0 +18,0 @@ settable, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230764
6702