MOARdV / AvionicsSystems

MOARdV's Avionics Systems for Kerbal Space Program - a new generation of IVA enhancement.
Other
52 stars 26 forks source link

Feature request: Engine Ignitor functionality. #145

Closed theonegalen closed 6 years ago

theonegalen commented 6 years ago

Engine Ignitor is being kept up to date by LGG now, but I can't find the original EngineIgnitorRPM module anywhere in the code. Would it be possible to get some basic EI functionality in MAS?

I'm thinking something like

engine.getCurrentEngineIgnitorChance() - returns a double range from 0 to 1 based on the _fuelFlowStability float from EI, if possible. Unless it being listed as a 'private float' means we can't access it.

engine.getCurrentEngineIgnitions() - returns the number of ignitions left in the current active engine.

Less priority are

engine.getEngineIgnitorChance(double engineID) - returns a double range from 0 to 1 based on the _fuelFlowStability from EI, if possible, for the specified engine.

engine.getEngineIgnitions(double engineID) - returns the number of ignitions left in the selected engine.

Those would require extending the engineID function of MASIEngine to all engines, not just AJE, though, and that might be more work than you want to take on. They would enable an Engine Ignitor page like the old one added by EngineIgnitorRPM back in the day, but a simple warning or go light could easily be set by the active engine versions.

I know I've been creating new issues left and right recently and I apologize if it is too much at once; I just have been thinking about what it's going to take to update Warbird Cockpits into MAS and what I plan for future IVAs as I reach the end of developing on RPM.

MOARdV commented 6 years ago

private float

Yeah, those are hidden from MAS. It has to be public, although maybe internal is possible (I don't think I've tried).

The current engine variants will be a challenge, since it's always possible to have multiple engines in a stage. Would MAS report the lowest value in cases where they are different?

theonegalen commented 6 years ago

The current engine variants will be a challenge, since it's always possible to have multiple engines in a stage. Would MAS report the lowest value in cases where they are different?

Maybe average the ignition chance instead? So if you have two engines that are at 80% and one at 50% you get a 70% ready rate? If we could have a page of all the individual engines (like with the second group of functions) then it would be trivial to switch over to that page and see which one was ready.

The current active ignitions would have to show the lowest number.

MOARdV commented 6 years ago

In reviewing this mod again, I think I'm going to skip adding direct MAS support. I don't use the mod myself, and it has a dependency on a second mod (toolbar controller) which itself has a dependency on a third mod (click through blocker). I don't really want to add two additional mods to my development environment simply to support learning how to use this mod, develop the interfaces, and maintain the mod down the road.