Ambient
Ambient copied to clipboard
API messages for other modules loading/unloading
At present, the only way for other modules to be notified of another module being loaded/unloaded is through that module announcing it itself. However, this is not always viable (original developer didn't/can't do it or the module panics and cannot announce its own unload), so there should be a mechanism intrinsic to the runtime for other modules to detect this.
This may be as simple as changing the existing ModuleLoad and ModuleUnload events to broadcast to all other modules, and to include the entity ID of the other module; I'm not sure if that's better than a separate set of messages.