all children, vectors for multiply used names, further hashes for subtrees
etc. Meant for quickly pulling in config branches where (almost) all values
are needed.
- usage of "var" keyword and named parameters in other (but not all) funcs
- add put_model() function to place models at given lon/lat. If
elevation is nil, then it will be put on the surface. The path is
relative to $FG_ROOT.
- let geo.click_position() and geo.aircraft_position() return copies
of the Coord class, not just a reference
view.nas: adaptation for geo.nas change; minor changes
debug.color(bool) turns terminal colors on/off
debug.tree(property="", mode=1); dumps property tree in flat
mode (0) or space indented mode (1).
Flat tree mode is similar to props.debug(), but colored, and it outputs
all attribute flags and the number of attached listeners.
those from traffic manager and AI, so that it will later be possible to
load the data into the UFO Scenery Object Editor, to visualize and edit
parking positions, taxiing routes etc. The parser also allows to suck
arbitrary (simple) XML data files into fgfs from Nasal context.
In the long run the non-standard XML files in fgfs shall, of course, be
converted to standard format, in which no data may be stored in attributes.
- rename <interval> to <wait>
- add <step-time> and <exit-time> on the <tutorial> level for default
step iteration and exit time
- let <init>, <step>, <error>, <end>, <abort> share handler for
<marker>, <set>, <view>, <nasal>
development. The file must be an XML file with Nasal between a
header/footer. It's a good idea to give it a *.nas extension, so
that editors choose the Nasal syntax coloring.
<PropertyList><script><![CDATA[
... here goes the Nasal code ...
]]></script></PropertyList>
$FG_ROOT/gui/dialogs/tutorial.xml. It combines the former selection
and description dialogs, which makes browsing much more pleasant.
No more switching back and forth between the two old dialogs. Also,
the <list> box can handle a bigger number of tutorials than the
<combo> box could.
- remove comments from the top of tutorial.nas. The documentation is
now $FG_ROOT/Docs/README.tutorials
- add a <delay> property that can be used at top level (for the default),
and in <init> and <step> (Time in seconds in which the main loop should
run again.)
- fix initialization bug
the "voice" part. It's no longer possible to display the three letters {|}
in screen message at the moment, but they aren't overly useful. We may want
to support escaping in the future, if necessary.
Negative values show that you are actually moving away. To avoid division
by zero, a small value is always added to speed. So, if you aren't moving
at all, you still get a non-infinity, but huge ETA.
- <set> pair: allow to set <property> from <value> or second <property>
- support <set> pairs in <end>, too. This can be used to restore values.
- add optional <view> to <init>/<step>/<exit>/<end>. This is meant for
cockpit tutorials. See the Lightning's startup tutorial for an example.
- add view manager for saving/restoring and moving/interpolating view
axes & fov to absolute values. This is used for cockpit tutorials in
$FG_ROOT/Nasal/tutorial.nas
- check a step's errors in random order (otherwise a retarded instructor
bitches minutes about the climb angle, and only then notices that the
heading is totally wrong ;-) ... mabye simple scheduling would be better
- document embedded <nasal>
- start of <view> support
entries /sim/tutorial/targets/target[n]/{distance-m,direction-deg} are
provided and kept up-to-date. A direction angle of 0 means that the target
is straight ahead, 90 means it's to the right (3 o'clock) 179 means the
target is right behind, etc.
- everywhere where <message> and/or <audio> is supported, there can be more
of those entries, in which case one is randomly chosen. This is to make
the instructions less monotone:
<message>You are too fast. Fly at 100 knots.</message>
<message>Not so fast. 100 knots are more than enough.</message>
<message>Slower! Idiot!</message> ;-)
- simple geo coordinates class: geo.Coord with methods to set/get single
components, to apply distance/course and the get distance/course to other
coords
- functions that return click and aircraft position as geo.Coord
- function that returns tile_path for given lon/lat
- function that returns normalized angle (0 <= angle < 360)
Help->Nasal-Console opens the adjustment dialog
- reset Nasal namespace for emebedded Nasal for every tutorial
- rename <voice> to <audio> (in the hope that this won't be mixed up
with Festival voice synthesis; should we call it <audio-sample>?)
- rename <instruction> to <message> for consistency reasons, so there
are now <step><message>s, <error><message>s, and <end><message>s
- add <marker> support (blinking magenta circle to point to switches etc.)
- use "real" conditions instead of tutorial-only ones
- list of <error> with <message> and <condition> children, instead
of one <error> group with <check> items (necessary because of <condition>)
- only one <exit> (use <condition><and>... to define a set
- rename properties <prop><val><msg> to <property><value><message>
(consistency with other systems)
- <end><message>/<voice> instead of <endtext> and <endtext-voice> etc.
- add <nasal> support everywhere, with separate namespace and predefined
tutorial functions in it (currently only say(), next(), previous())
- make <timeofday> property actually work
TODO:
- more cleanup/re-organization
- add optional <view> group, to direct user view to switches (for startup
tutorials etc.)
2-space indentation changed to tabs (with Stuarts permission), and braces
to K&R style (rationale on request :-)
by debug.nas to turn on/off syntax coloring for dumped data (which
is desirable as compound data types can fill several screens with
rather hard to read data). Unfortunately, it can't be reliably deduced
from the OS whether ANSI colors are available or not.
- move "multiplayer chat" properties to where they belong
- use extra function for resuming normal mode after lookat: dynamic_view.resume()
- add fov (field-of-view) to interface: me.fov_offset
- remove register_headshake and me.headshake; this can still be done via
normal register(). If only headshaking is to be added, while keeping default
plane view, do this:
dynamic_view.register(func {
default_plane();
me.x_offset = ...
me.y_offset = ...
me.z_offset = ...
});
- initialize /sim/time/delta-realtime-sec, so that the lowpass filter doesn't
complain if it's starter eraly (of course the results won't be correct
until the delta is real)
aircraft can plug a custom function. This function can access all internal
variables of the ViewManager class. It can set me.{x,y,z}_offset, and also
add offsets to me.{heading,pitch,roll}_offset. Example:
dynamic_view.register_headshake(func {
me.x_offset = rand() * 0.02; # Parkinson effect
});
The advantage of this implementation is that it doesn't break MMB drag
functionality, and that is can be frozen by mouse movements.
or of given frame
- add debug.string(<variable>). This returns the variable dump as
string.
- add var to module function variables to avoid collisions with module names
Remember: dynamic_view.lookat(heading, pitch, roll) moves view
smoothly to this direction, while dynamic_view.lookat() moves it back.
This can be used for quick view changes to the panel etc. It's currently
only used in the bo105 (flaps-up binding).