Diziet Sma wrote:The current system of identifying conflicting OXZs in the manifest.plist
is not really workable when it comes to HUDs, since all HUD authors would have to go back and update their manifest.plist
s every single time a new HUD was released.
Not quite - if A conflicts with B, B doesn't need to conflict with A as well. The newest HUD author just needs to conflict with all the existing HUDs each time. Still a lot of effort, though.
Diziet Sma wrote:Perhaps a kind of blanket conflict can be introduced instead. If the Expansion Manager notices that you have a HUD installed, it marks all others as conflicting by default
I really don't like this idea - it means that if some person comes up with a way to make HUD OXPs non-conflicting, there then has to be a new stable release of Oolite before it does any good, which then takes away the incentive to come up with the way to make HUD OXPs non-conflicting.
...oh, all right then. To make HUD OXPs non-conflicting, start by changing them to define
oxpprefix-hud.plist
rather than
hud.plist
. Then, write a HUD manager OXP which creates an F4 HUD Selector interface. The HUD OXPs register themselves with the HUD manager OXP (and
require the HUD manager OXP in their manifests, of course); the HUD manager OXP then sets
player.ship.hud
as chosen by the player in the interface (either on select, or stored in a mission variable for reload).
The HUD OXPs could then even optionally sell their HUDs as ship upgrades, and only register themselves with the manager once the equipment is bought (set the equipment to be invisible, transferable between ships, and non-damageable).
(Handling switching HUDs this way is only slightly more complex: the switching HUDs just need to make sure that they only run their HUD switch code if the current HUD is one they own)
Diziet Sma wrote:Of course, this would mean that MFDs would need their own category, instead of being classed as HUDs, as is presently the case. Probably best to take care of this detail now, as the situation will only get worse as more and more MFDs are released.
MFDs should go in whatever category makes sense - some will be Equipment, some will be HUD, some will be components of a larger OXP (e.g. a mission). Using HUD as the category for ones which are basically just HUD enhancements (even if you need to buy a piece of equipment to allow you to turn on the MFD) seems to make sense to me - the distinction between equipment which is an MFD and equipment which provides an MFD to help with control/output of the equipment, perhaps?