1
0
Fork 0
Commit graph

3 commits

Author SHA1 Message Date
Florent Rougon
2eb6e7b367 README.add-ons: adapt example to new header (with meta and file-type nodes) 2017-12-10 22:38:38 +01:00
Florent Rougon
33bc7eabb3 README.add-ons: use explicit node typing in the sample metadata file and more spacing
The explicit typing shouldn't change anything for the parsing code in
flightgear/src/Add-ons/AddonManager.cxx, because for each field, this
code knows the correct type and explicitly asks for it (and only once),
but external code might include addon-metadata.xml in some prop tree,
and then the explicit typing is likely to give better results.
2017-12-09 13:49:20 +01:00
Florent Rougon
c535306b3d Add-ons: simplify loading using the new API, set the 'loaded' flag
Also:
  - use the namespace __addon[ADDON_ID]__ when loading an add-on's
    main.nas file (previously, the namespace used was __addon[i]__ where
    i is 0 for the first registered add-on, 1 for the second one, etc.);
  - use logprint() instead of printlog(), because the former writes a
    more helpful source file and line number for the log call in
    fgfs.log (i.e., not always src/Scripting/NasalSys.cxx...);
  - remove the listener once it has been fired;
  - add documentation in Docs/README.add-ons.
2017-12-08 00:37:21 +01:00