20,741
edits
m (→Introduction and motivation: + links) |
m (→modules.nas) |
||
Line 13: | Line 13: | ||
In ''modules.nas'' the class ''Module'' is defined. | In ''modules.nas'' the class ''Module'' is defined. | ||
A module object holds information about the path and filename of the Nasal script and supports unloading and reloading the code at runtime | A module object holds information about the path and filename of the Nasal script and supports unloading and reloading the code at runtime | ||
(e.g. without restarting Flightgear as a whole) by tracking some critical resources like listeners and timers. | (e.g. without restarting Flightgear as a whole) by tracking some critical resources like [[Listener|listeners]] and [[Timers|timers]]. | ||
Parts of this functionality | Parts of this functionality were added to the [[Addons|addons]] manager earlier and have now been extracted to avoid code duplication. | ||
=== Differences between add-ons and modules === | === Differences between add-ons and modules === | ||
While there are many similarities between add-ons and modules, some words on the differences: | While there are many similarities between add-ons and modules, some words on the differences: | ||
Modules are distributed with | Modules are distributed with FlightGear as part of Fgdata. | ||
Add-ons have to be downloaded | Add-ons have to be downloaded separately by a FlightGear user from wherever the author of the add-on publishes the add-on. | ||
Modules can be loaded e.g. by an aircraft if the aircraft developer wants to make use of the module. | Modules can be loaded e.g. by an aircraft if the aircraft developer wants to make use of the module. | ||
Add-ons are selected by the user before launching | Add-ons are selected by the user before launching FlightGear, thus they may or may not be available at runtime. | ||
== Nasal modules == | == Nasal modules == |