Ippo343 / DangIt

DangIt! A random failures mod for Kerbal Space Program
8 stars 16 forks source link

rcs truster state not checked for PartIsActive #97

Closed supermerill closed 9 years ago

supermerill commented 9 years ago

in the PartIsActive function, a rcs thruster is marked "active" if any rcs is used at this time. I know it's an approximation, as not all are used at the same time (~ roughtly their lifetime is /2, right?). But if i disabled a rcs thruster on my lander (ex: for the interplanetary travel), it should not fail (as we don't use it). I didn't see the code in ModuleRCSReliability.cs as i can see it for reaction wheel (ReactionWheel.cs).

patch:

<<< before: line 25 in ModuleRCSReliability.cs return rcsModule.thrustForces.Max() > (0.1 * rcsModule.thrusterPower); <<<<

after: // Unless the user has turned it off return rcsModule.thrustForces.Max() > (0.1 * rcsModule.thrusterPower) && rcsModule.isEnabled;

note: same thing may be good for the battery also. Would allow better/easier management of "lifeboat"

Ippo343 commented 9 years ago

I'm sorry, I don't understand what you mean. Right now an rcs block is considered active if it's producing at least 10% of its maximum thrust, independently from other RCS blocks. If you disable a thruster, it won't produce any thrust and won't be considered active by this function.

supermerill commented 9 years ago

Oh, i misunderstood the comment block. my bad.