610
edits
No edit summary |
mNo edit summary |
||
Line 85: | Line 85: | ||
** Loading <code>/foo/bar/baz/addon-main.nas</code> into namespace <code>__addon[ADDON_ID]__</code> | ** Loading <code>/foo/bar/baz/addon-main.nas</code> into namespace <code>__addon[ADDON_ID]__</code> | ||
** Calling <code>main(addonGhost)</code> from <code>/foo/bar/baz/addon-main.nas</code>. | ** Calling <code>main(addonGhost)</code> from <code>/foo/bar/baz/addon-main.nas</code>. | ||
== Aircraft specific config (addon-hints) == | |||
Some addons need per-aircraft configuration. While addons should strive to be self-contained (ie. the addon should contain means to | |||
detect different aircraft and apply config from whithin the addon) there is also the possibility for the addon to read so called "addon-hints". | |||
For this, a special property tree exists: <code>/sim/addon-hints/<addon>/...</code> | |||
The tree is expected to be populated from the aircraft.xml file. The addon can then read the properties from a common place regardless of loaded aircraft. | |||
<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<sim> | |||
<addon-hints> | |||
<my-addon> | |||
... | |||
</my-addon> | |||
</addon-hints> | |||
</sim> | |||
</syntaxhighlight> | |||
== APIs == | == APIs == |
edits