pioneerspacesim/pioneer — pull request #3180 by johnbartholomew (2014-09-14 14:41:56+00:00)
Title: [WIP] FaceGen code restructure

I've rewritten FaceGenManager as 'FaceParts', with the following improvements:

* Random face generation (part selection) is separated from display.
* Individual parts can be set manually with the remaining components randomised. Part selection should be stable for a given seed, so fixing one component and regenerating with the same seed should not change the other components.
* Somewhat shorter implementation.
* The number of parts provided for males and females no longer has to match.
* Any individual part image can be tied to some arbitrary combination of species, races and genders (e.g., you could have some clothing or some accessories [eg, tattoos] that are tied to a particular gender or tied to a particular race/gender combination, etc, and other items that can be used by any race and gender). [*NOTE:* Currently there is no way to access this functionality, because the data/facegen/ directory structure doesn't allow such flexibility]

FaceParts also gets rid of the face backgrounds because they're not really necessary, the only backgrounds we currently have are ugly, and it didn't make much sense to me that backgrounds are tied to particular species (they should be tied to ships & stations, I think).

This restructuring is intended to make it possible to create an interface to give the player more control over their face image by cycling through the available parts. This is something that @fluffyfreak started to work on but couldn't make progress on because the underlying code structure was too awkward to work with. I'm putting this up as a PR in case anyone wants to step in from this point and start implementing a Face Chooser dialog.