Improvements to ScriptEvents so that objects can register for sim-wide events.
Merge remote-tracking branch 'upstream/master'