Boris-Barboris / AtmosphereAutopilot

Plugin for Kerbal Space Program
GNU General Public License v3.0
48 stars 16 forks source link

Serialize Use_breaks #31

Closed therik closed 2 years ago

therik commented 2 years ago

Hello, could we make the Use_breaks field in the thrust controller serializable? I can't save the settings, and every load of the game, I have to manually unset it. Tried adding use_breaks=False to global settings and vessel design, no dice.

I'm not a C# dev, but I think the culprit is that it isn't serializable: https://github.com/Boris-Barboris/AtmosphereAutopilot/blob/556d5d4f7053ddbc6d88c5173c4c6611cfa30edb/AtmosphereAutopilot/Modules/ProgradeThrustController.cs#L155

On a related note, could we also fix 2 minor issues: When use_breaks is on (default), I can't manually use the breaks, and when the module is actively breaking, and I press the "master switch" [P], the breaks keep on.

Cheers.

Boris-Barboris commented 2 years ago

I'm not a C# dev, but I think the culprit is that it isn't serializable:

True, it's an easy fix.

When use_breaks is on (default), I can't manually use the breaks, and when the module is actively breaking, and I press the "master switch" [P], the breaks keep on.

Hmm, maybe it's something new... I'll have a look next week.

therik commented 2 years ago

Wow, amazing, thanks! I'll check it out in the evening.