Nasal Initialization: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
Line 1: Line 1:
{{Nasal Navigation}}
{{Nasal Navigation}}
{{Mergefrom|Nasal initialization order}}
some notes on how Nasal files from FGDATA/Nasal are processed when Flightgear is started.
some notes on how Nasal files from FGDATA/Nasal appear to be processed when Flightgear is started.


= Initialization of Nasal core-/default-modules =
= Initialization of Nasal core-/default-modules =
Line 7: Line 6:


== Core modules ==
== Core modules ==
The nasal root folder (FGDATA/Nasal/) is scanned for .nas files and these files are loaded (apparantly in alphabetical order).
The nasal root folder (FGDATA/Nasal/) is scanned for .nas files and these files are loaded in alphabetical order.
After all .nas files are loaded {{code|/sim/signals/nasal-dir-initialized}} is set, which triggers listeners in some of the files just loaded.
After all .nas files are loaded {{code|/sim/signals/nasal-dir-initialized}} is set, which triggers listeners in some of the files just loaded.
This allows to use functions from other core files, which have just been defined, e.g. which were not yet available when parsing the file.
This allows to use functions from other core files, which have just been defined, e.g. which were not yet available when parsing the file.
{{note|for a list of modules see [[Nasal Modules]]|margin=10px|width=50%}}
{{note|for a list of modules see [[Nasal Modules]]|margin=10px|width=50%}}
=== Nasal load priority (version 2020.1) ===
Since version 2020.1 files that are listed in /Nasal/loadpriority.xml will be loaded first (in the order they appear in this XML).
The remaining files will be loaded in alphabetical order.
After some dependency checks, loadpriority.xml was filled with the relevant filenames.
Most of the listeners (nasal-dir-initialized) have been removed accordingly.


== Optional (load-once) modules ==
== Optional (load-once) modules ==
252

edits

Navigation menu