pioneerspacesim/pioneer — pull request #1870 by Brianetta (2012-12-23 18:25:14+00:00)
Title: Mission registry

New registry of mission types. Includes data for a mission type, rather than a mission instance. At the moment this includes a descriptive string and a function to return a UI object, both for the mission list in InfoView.

InfoView now tests missions to see if they have a registered type. If they do not, this indicates that the module which created them is not loaded (probably, was removed between saving and loading). In this cast, the status is marked as "Inactive" and the type is marked as "None." No UI is loaded.

If the module is later re-installed, it will begin working again.

If two modules are loaded which both register the same mission type, Missions.lua will complain.

One thing that can't be tested for is one module registering a type, a mission being accepted, the game saved, the module removed, another module that registers the same type but with different specifics being installed, and the game being loaded. If that happens, correct behaviour isn't guaranteed.