- use Nasal features that were introduced after this code was first written:
* var for local variables (and to make clear when a variable is first used)
* += operator
* listeners to import seldom changing variables and to avoid waiting for
the FDM in a loop
This new code started as empty file where I added my stuff and then copied
parts from the old code, piece by piece. This is why the coding & indentation
style has changed. Functionally the code should basically be equivalent.
typo; the SimGear "pass subproperty as first argument" shortcut
doesn't work in Nasal. This checkin is blind, but should have a high
probability of correctness.
"engines die when any tank is empty" behavior. Otherwise, just
deselect the empty tank. This matches the "both" behavior many
lightplane fuel selectors have.
tanks created by the C++ code look empty, and were causing the fuel
code to detect out of fuel conditions. Since there is no way to tell
a "FDM" tank from a "C++" tank, I just filter them by capacity. Very
ugly hack, we need to fix the code to report only the tanks created
by the aircraft/FDM configuration.