1
0
Fork 0
Commit graph

1528 commits

Author SHA1 Message Date
Richard Harrison
1d0129bdd9 Fixed timers in wildfire 2020-02-22 19:51:41 +01:00
Henning Stahlke
c6e5244b13 update defaults.xml
add repair_config.nas to fix old userarchive flags
2020-02-15 14:39:36 +01:00
Stuart Buchanan
4b0d08975c Merge /u/jsb1685/fgdata/ branch next into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/164/
2020-02-12 19:38:43 +00:00
Henning Stahlke
1b2014ed04 minor improvements to modules.nas 2020-02-03 09:59:38 +01:00
James Turner
53e3bac6ee Merge /u/deltaecho/flightgear_fgdata/ branch next into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/163/
2020-01-30 10:40:01 +00:00
Henning Stahlke
e39ebd79e3 add Nasal loadable module support (modules.nas) 2020-01-26 18:13:08 +01:00
jano
c982d3e333 added a page with the unit toggle, to display lag statistics, to help diagnose and address lag issues 2020-01-14 11:58:26 +01:00
Richard Harrison
e9b12b302f Fix Tanker when no offset specificed 2020-01-10 20:00:55 +01:00
Richard Harrison
94c9f3b428 Fix failure manager warning
ironically the warning message was causing a more serious failure.
2019-12-11 17:53:35 +01:00
Henning Stahlke
5676ce6c68 add is_directory(path) and subdirectories(path) to Nasal/io.nas 2019-11-09 23:26:49 +01:00
Henning Stahlke
43efd64dd2 add aspect ratio lock feature to canvas window; user window.lockAspectRatio() to activate 2019-11-06 22:59:08 +01:00
Julian Smith
3302620745 Nasal/multiplayer.nas: Make sure we update view if /sim/current-view/model-view is changed. 2019-10-25 21:03:36 +01:00
Thorsten Renk
8efa938ace Add volcanic activity for Surtsey 2019-10-19 10:27:33 +03:00
Thorsten Renk
79af6d0fd0 Fix spurious altitude variation in improved analytical orbit of orbital target 2019-10-06 11:30:07 +03:00
Stuart Buchanan
01dc9d0b38 Add props.nas getDoubleValue(), getIntValue()
Also fixed an issue with whitespace around view parameters.
2019-09-22 21:14:07 +01:00
James Turner
f83caf7e45 The default GPS delegate now handles sequencing
In conjunction with some FlightGear changes, the delegate can now do
all sequencing decisions, i.e the GPS C++ code does not make any policy
decisions about sequencing.

Update the default Nasal delegate to mimic the old behaviour, and set
the config option, both to allow future developments and to demonstrate
the new API.
2019-09-20 13:08:10 +01:00
James Turner
0172ef9d08 Nasal fixes for unit testing
Tolerate missing properties in various places, since defaults and 
other subsystems might not have created them.
2019-09-18 15:00:00 +01:00
Julian Smith
e41c0f099b Nasal/canvas/tooltip.nas: handle multiple properties.
Allows sprintf string to contain multiple %'s, which are mapped to multiple
<property>...</property> tags.
2019-08-31 14:14:18 +01:00
Julian Smith
c280ff3fc4 Nasal/prop_key_handler.nas: fixed couple of issues in search ('?') code.
Don't include initial '/' in search string.

Don't fail if a property value is -Nan.
2019-08-31 14:14:18 +01:00
Julian Smith
96fd272a51 Nasal/prop_key_handler.nas: added new '#' command to listen to properties.
Sets up listeners to show all changes to specified property or any of its child
properties.
2019-08-31 14:13:31 +01:00
Delta Echo
16086cac2d [Nasal]Add possibility to recognise drag robots for glider towing 2019-08-31 10:20:15 +02:00
Julian Smith
8301a4f16e Nasal/view.nas: allow Tower View Look From to work with multiplayer aircraft. 2019-08-29 00:11:52 +01:00
Julian Smith
2c5f6a96c2 Nasal/view.nas: Implemented multiplayer fly-by view. 2019-08-29 00:11:52 +01:00
Julian Smith
7550ff70d9 Nasal/view.nas: set new property /sim/current-view/multiplayer to 0 or 1.
Useful to have this information available as a simple property.
2019-08-29 00:11:51 +01:00
Julian Smith
48911a8131 Nasal/gui.nas: nextStyle(): popup new GUI style's name.
Also added delta param to control direction of change.
2019-08-29 00:11:51 +01:00
Julian Smith
2d8ec16afc Nasal/multiplayer.nas: improved font handling in Pilot List dialog.
It looks like widgets don't inherit font or colour from parent widgets. Also,
setting font=nil gives sublety different results compared to leaving font
unspecified.

So we now set font and colour explicitly for every widget using new function
set_default().

Also set font and colour of 'Pilots:' widgets and heading widget to me.fg[1] to
match other text.
2019-08-29 00:11:51 +01:00
Julian Smith
0f741b16fe Nasal/multiplayer.nas: disable 'no model installed' messages. 2019-08-29 00:11:51 +01:00
Julian Smith
c4d71f06e0 Nasal/multiplayer.nas: remove hard-coded default font params.
These are unnecessary because we use gui/styles/*. This also allows an empty
style to be specified, where we inherit from system-wide defaults.
2019-08-29 00:11:51 +01:00
legoboyvdlp R
fc7319a5da Local weather: correct the fade in rate per private discussion with Thorsten, this will in the short term reduce jumps until I figure out changing this per distance; this was originally meant to be over 10 seconds apparently 2019-08-27 20:56:32 +01:00
Julian Smith
81fc15d8e7 Nasal/view.nas: fix for regression in handling of /sim/current-view/?-offset-m.
resetViewPos(): set /sim/current-view/?-offset-m to
/sim/view[]/config/?-offset-m, not zeros.

This requires corresponding change to flightgear to compensate for the extra
offset, and fixes things when aircraft implement custom views by writing to
/sim/current-view/?-offset-m.
2019-08-12 18:02:02 +01:00
Julian Smith
ff503c1093 Nasal/multiplayer.nas: in Pilot List, append +/- to altitude if ascending or descending. 2019-08-12 18:02:02 +01:00
Julian Smith
4e94cdc906 Nasal/multiplayer.nas: in Pilot List, added column showing id of nearest airport.
Requires changes to flightgear to populate
/ai/models/multiplayer[]/sim/tower/airport-id.
2019-08-11 13:22:59 +01:00
Julian Smith
f591120032 Disabled old 'Model View' selector by default.
It is now called 'Legacy multiplayer view selector', and enabled/disabled via
new checkbox in the 'View - View Options' dialogue.
2019-08-05 07:31:47 +01:00
Julian Smith
2e5e314a77 Nasal/view.nas:stepView(): also create /sim/current-view/view-number-raw.
This allows new view code to find the view configuration with non-sequential
view numbers (e.g. on 777).
2019-08-05 07:31:47 +01:00
Julian Smith
a10274665d Nasal/view.nas: pilot_view_limiter: protect against nil. 2019-08-05 07:31:47 +01:00
Richard Harrison
294e76a47f Revert "Nasal/screen.nas: move log window to top-left and left-align the text."
It's always been at the top; and although it is clear that the intent of this change was to improve things it highlights the need to make more substantial improvements to the way on screen messages are handled.

What we probably should have is an area that has a transparent dark background, a fixed size, supports scrolling, can be left open (or re-opened) and moved persitently around the screen.

This reverts commit 82f3eb45b9.
2019-07-29 13:00:23 +02:00
James Turner
0a68cbd93a Merge /u/jsb1685/fgdata/ branch next into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/151/
2019-07-22 15:54:56 +00:00
Henning Stahlke
aaa7888f6b add setViewByIndex to view.nas 2019-07-21 12:56:01 +02:00
Julian Smith
c80059ba53 Removed Model View so that Tower View AGL doesn't alter view numbers.
Due to Nasal/view.nas making a sequential copy of views, inserting new view
number 8 for Tower View AGL broke custom views, e.g. for aircraft 777).

We no longer require Model View (it's identical to Helicopter view now), so
this way we can have Tower View AGL without altering sequential view numbers.
2019-07-20 22:01:05 +01:00
Julian Smith
3738d84d7b Nasal/view.nas: set /sim/viewp[]/config/root to point to multiplayer data.root.
This is required by view code.
2019-07-09 16:25:11 +01:00
Julian Smith
f61b097eb3 Nasal/multiplayer.nas: In Pilots list, use only one colour (white) for pilots for whom we have a model.
I think the previous alternating colours were confusing because of the use of
a third and fourth colour for when we have no model or are using a fallback
model.
2019-07-09 16:25:11 +01:00
Julian Smith
82f3eb45b9 Nasal/screen.nas: move log window to top-left and left-align the text.
Reduces chat messages etc obscuring HUD.
2019-07-09 16:25:11 +01:00
Julian Smith
e2df25343a Nasal/multiplayer.nas: reordered columns in Pilot List window.
Moved 'code', 'ver' and 'set' away to the right, as i think they are less
important. Also demoted 'brg' a little and promoted 'dist-'.
2019-07-09 16:25:11 +01:00
Julian Smith
47415e20ce Pilot List dialogue now allows control of which aircraft to view.
I think this is more convenient than the normal model-view buttons / popup
list. [Though this is still there.]

Nasal/multiplayer.nas:
    Added new column 'view' with checkbox. Also added 'view self' button to
    titlebar to view the user's aircraft.

    Fix some bad indentation.

Nasal/view.nas:
    Changed /sim/current-view/model-view to contain just the callsign, not
    '<callsign> <model>', so that Nasal/multiplayer.nas can get the callsign
    reliably.
2019-07-09 16:25:11 +01:00
Julian Smith
56859113b2 Nasal/multiplayer.nas: added column showing whether we've found and loaded -set.xml for each multiplayer.
This determines whether multiplayer views work correctly - these require
correct view offsets from the -set.xml files.
2019-07-09 16:25:11 +01:00
Julian Smith
9822b8ff8c Added multiplayer support to Helicopter View and Tower View etc.
We remember the multiplayer aircraft so that when switching between views,
multiplayer views (currently Helicopter, Model, Tower and Tower AGL) show the
same aircraft.

Nasal/view.nas: use /orientation/true-heading-deg in Model view and Tower AGL
view. This avoids problem when looking at multiplayer aircraft because there is
no /ai/models/multiplayer[]/orientation/heading-deg

Nasal/view.nas: improved handling of sim/current-view/{x,y,z}-offset-m. Changed
resetViewPos() to set these all to zero, because view's offsets are now
kept separate. Also removed setting of /sim/current-view/z-offset-m to
chase-distance - this is the wrong place now that views define the offset
explicitly.

Also added Tower View AGL support.
2019-07-09 16:25:11 +01:00
James Turner
20bcc16032 Route-manager: guard against a procedure failure
When we have a STAR which is invalid for the selected runway, which
can occur when switching runway/approach, don’t cause a Nasal runtime
error.
2019-06-24 16:41:45 +01:00
James Turner
52373760e2 Canvas Map: tolerate empty paths in waypoints
This fixes bogus indexing warnings and thus Nasal failures when
processing certain kinds of FlightPlan leg, such as discontinuities
and skipped legs.
2019-06-24 16:39:51 +01:00
Richard Harrison
88ff80737f Tanker compatibility for models with unspecified refuel offsets.
Ensure that the offset properties are created and fix a nilptr reference
2019-06-11 14:41:12 +02:00
Richard Harrison
a3a1ae01c8 Emesary: added optional overrun detection
- This will alert if any individual notifcation takes more than a certain amount of time to process.

Works well with the Emesary M_exec to identify where the slow parts of Nasal are.
2019-06-11 14:41:10 +02:00