Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ferram Support. #18

Merged
merged 9 commits into from Mar 30, 2019
Merged

Ferram Support. #18

merged 9 commits into from Mar 30, 2019

Conversation

NipperySlipples
Copy link
Contributor

Adds support for Ferram Aerospace. Includes Control surface failures and parachute failures with FAR's implementation of realchute.

Control Surface Failure - Will either lock input response to 0 (Stuck control surface) or the control surface will malfunction and randomly alter your input response - All controlled by weighted random odds loaded from the .cfg.

Parachutes will deploy immediately in atmosphere if packed. If already deployed they will cut. If you are not in an atmosphere they will immediately arm and deploy as soon as you enter any atmo. You cannot disarm or repack the chute if it hasn't been repaired, so a failure mid mission in space will need to be repaired or your parachute is gonna deploy as soon as you touch an atmosphere.

Added a little more functionality to force failure and implemented a force repair method for easier testing.

Cleaned up some code for very minor performance improvements.

Added functionality to the ferram Wrapper.

FARControlSurfaceFailure added with 2 types of failures. Still has a few bugs to work out.

Just moving to another computer and commiting was the fastest way.
Force Failure works a little better now (repeating the failPart() over and over like it would normally, instead of running it once.)

Added Force Repair to compliment for easier testing.

Hasfailed = true was being run before FailPart() in StartFailure. Many of the failures do checks with hasFailed for a first run to write messages/ setup. (see batterys, solar panels and my antenna/control surfaces.) This fixes a bunch of little bugs but may create issues in some of the failures. Need to confirm.

Additional functionality added to FARControlSurfaceFailure. It works now. 2 types of failure. Completly stuck surface (0 control reponse) or Hinge failure (randomly adds/subtracts/resets your control response. Makes for really fun landings after a failure without being a complete mess like a stuck surface would).

ToDo:
Test/bugfix.
Read a bunch of values from the mm config.
Persistence after save/load is a little wonky. (Re-rolls on reload. Needs a little logic).
Fix highlight persistance.

Possibly add lifting body/surface failures that simulate airfoil problems.
Cleaned up the FAR control surface failure. loading a few values through the MM config now.

Began support for Parachute failures with far's implementation of realchute. Added FARParachuteFailureModule.
Fixed hasfailed confusion.  - hasfailed = true was being called before failPart() in basefailmodule, but some of the failures would use hasfailed as a check for first run of failpart.  Now hasFailed will be false for the first run of failpart, and true for all additional.

Forced Repair works properly now.
Forced Fail works properly now (I broke it previously.)
The two can now be used to test easily.

Far RealchuteLite parachute failures work properly now. If the parachute isnt deployed, it will deploy (in atmo) or arm for immediatly deployment (in space). The disarm is disabled so you have to repair it before entering an atmo or it will imediatly deploy.

If the parachute is already deployed, the failure will cut it. You also cannot repack a failed parachute until its repaired.

Cleaned up Code a little.

Load weights for randomization of control surface failure from the mm cfg.
Ferram Support (Control Surface and RealchuteLite)
Weights now properly load from cfg file.
Sanity checks added to weights.
Moved a few calls to overide instead of fail part for very minor preformance improvements.
Cleaned up some comments/debug print statements.
@severedsolo severedsolo merged commit 84a03c2 into severedsolo:1.6_Dev Mar 30, 2019
@severedsolo
Copy link
Owner

Looks good - thanks. Will actually sit down and do some work on this soon I swear 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants