20,741
edits
No edit summary |
|||
| Line 126: | Line 126: | ||
globals->add_subsystem("sound", new SGOptional<SGSoundMgr>("/enable/sound"), SGSubsystemMgr::SOUND); | globals->add_subsystem("sound", new SGOptional<SGSoundMgr>("/enable/sound"), SGSubsystemMgr::SOUND); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Also, many extension functions are specific to certain subsystems, i.e. property tree, sound, FDM, tile manager etc - these would also need to be registered and removed based on the "parent" subsystem's property signals. | Also, many extension functions are specific to certain subsystems, i.e. property tree, sound, FDM, tile manager etc - these would also need to be registered and removed based on the "parent" subsystem's property signals. | ||
== Nasal Scripts == | == Nasal Scripts == | ||
It's also worth mentioning that base package files (XML, Nasal etc) may be trying to use disabled subsystems via some extension functions, so this needs further attention by only loading such Nasal modules via listeners (using the existing "Sub module" approach),so that they can be cleanly shut down when a subsystem is terminated, and replaced with a "dummy" routine which prints an error to the console, indicating that the requested subsystem isn't available. | |||
Nasal scripts would need to register listeners so that they are aware of running/disabled subsystems that they depend on, and deal with any status change properly. Also, we would probably want to differentiate between Nasal scripts loaded as part of an aircraft, and "system-wide" scripts - to ensure that resetting the sim, and possibly changing the aircraft can be supported by suspending and removing all aircraft-specific Nasal scripts automatically. | Nasal scripts would need to register listeners so that they are aware of running/disabled subsystems that they depend on, and deal with any status change properly. Also, we would probably want to differentiate between Nasal scripts loaded as part of an aircraft, and "system-wide" scripts - to ensure that resetting the sim, and possibly changing the aircraft can be supported by suspending and removing all aircraft-specific Nasal scripts automatically. | ||
<references/> | <references/> | ||