pioneerspacesim/pioneer — pull request #1854 by Brianetta (2012-12-22 01:05:47+00:00)
Title: Mission object

Replaces the (new) mission code with an object class. As an instance of the Mission object, missions no longer need to be explicitly updated. A mission can be passed around by direct reference, rather than by index in another table. Modules may remain ignorant of how or where missions are stored; once constructed with `New`, they appear in the mission list until the `Remove` method is called.

The missions are serialised correctly, and no longer suffer from display problems caused by holes in the array index used by the UI.

The new class is also robust when the module that defined it is removed. Any missions in the list that have been orphaned by the removal of a module will show type "None" and will have no details. They will automatically start working again if the mission's module is replaced. If the player is irritated by these missions, they can be manually `Remove()`d using the Lua console.