code that is called from outside. It will be removed from the global namespace
once it has done its job. For now it only selects a proper runway for wind
directions reported by METAR, but only, of course, if an airport was chosen,
but no runway and no heading, and if the aircraft is actually on ground.
from its property tree. The node remains accessible as long as references
to it are kept. Example:
var cow_chain = func {
var cow = geo.put_model("Models/Fauna/cow.ac", geo.aircraft_position());
settimer(func { cow.remove() }, 10);
settimer(cow_chain, 2);
}
cow_chain();
the $FG_ROOT/Nasal/*.nas ones are done. This allows to use props.Node etc.
immediately, without requirement for settimer(func{}, 0) constructions.
Rationale:
- clean separation of local additions (and hacks :-) from standard files
- users might not have write permission to $FG_ROOT/Nasal/ or shouldn't
have to su to root for writing Nasal code
- Page up/down changes the selected throttles one step up/down, i.e.
if the original throttle settings were x steps apart they remain
steps apart (unless the boundary is reached).
- Mouse + MMB drag changes the selected throttles by the delta amount
(length of drag).
- The throttleAxis() wrapper for joysticks sets the selected
throttles to correspond to the joystick's axis position. I.e. all
selected engines will get the same throttle setting. Since most
joystick throttles are positional devices I think this behaviour
is more logical than using a relative adjustment in this case. """
mf: slightly modified, added var etc. (more such changes in controls.nas
to come)
- move "fire starter" from SPACE-key to s-key
- move "open property browser" from Shift-SPACE to Shift-Enter (Shift-Return)
- implement PTT on SPACE/Shift-SPACE (with the other six SPACE/modifier
combinations unused, apart from a popup)
- add controls.ptt(v) wrapper function (v can be 1 or 2 for on, and 0 for off)
Easter-Egg:
- pressing the t-key for at least one second resets the warp delta.
This is an experimental feature that most people won't notice. It's meant
for investigating if suchlike "unorthodox" key use is acceptable. While
modifier-keys are the norm on computer keyboards, modifier-times aren't,
although we are used to them from other devices, such as alarm clocks etc.)
May later get removed without warning.
algorithm (needed for the file selector and useful for other purposes, like
assembling lists of livery or screenshot files etc.)
- io.nas: move fixpath to string.nas (it's not only useful for file paths
but can also be used for property paths)
- screen.nas: move trim to string.nas (used by screen.nas and nasal-console.xml)
- gui.nas: add pattern matching to FileSelctor
- ufo.nas: use patterm matching (only *.ac and *.xml files shall be listed)
with Coord.lat() and Coord.lon(), and because this is the preferable unit
in script space)
- add put_model(<path>, <coord> [, <hdg> [, <pitch> [, <roll>]]]) variant,
which takes a Coord instead of <lon>/<lat>/<alt>). Here's some inspiration:
setlistener("/sim/signals/click", func {
geo.put_model("Models/Fauna/cow.ac", geo.click_position(), 360 * rand());
});
dialog's <name> entry)
- FileSelctor: new class derived from Dialog. It clones the file-select
dialog and reports chosen files/dirs via callback function.
a side effect of the stack loop already
- replace all backslashes by slashes, to avoid security problems on UNIX
(if support for them is desirable on MS Windows, then we'd need an OS
property)