From d4fe3dbf75821a1476628b111330cd2d8e33f9da Mon Sep 17 00:00:00 2001 From: severedsolo Date: Sun, 21 May 2017 15:16:51 +0100 Subject: [PATCH] SolidFuel will no longer fail --- UPFM/Untitled Part Failure Mod/BaseFailureModule.cs | 1 + UPFM/Untitled Part Failure Mod/EngineFailureModule.cs | 5 +++++ .../GameData/UntitledFailures/MM Patches/DontLeak.cfg | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs b/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs index 19efc47..a156388 100644 --- a/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs +++ b/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs @@ -97,6 +97,7 @@ bool FailCheck(bool recalcChance) { chanceOfFailure = chanceOfFailure / generation; if (SYP.TimesRecovered > 0) chanceOfFailure = chanceOfFailure * ((SYP.TimesRecovered / expectedLifetime)); + } Debug.Log("[UPFM]: Chances of "+part.name+" failing calculated to be " + chanceOfFailure * 100 + "%"); if (UnityEngine.Random.value < chanceOfFailure) return true; diff --git a/UPFM/Untitled Part Failure Mod/EngineFailureModule.cs b/UPFM/Untitled Part Failure Mod/EngineFailureModule.cs index 8e6d131..13673b4 100644 --- a/UPFM/Untitled Part Failure Mod/EngineFailureModule.cs +++ b/UPFM/Untitled Part Failure Mod/EngineFailureModule.cs @@ -23,6 +23,7 @@ protected override bool FailureAllowed() protected override void FailPart() { + if (part.Resources.Contains("SolidFuel")) return; engine = part.FindModuleImplementing(); if (engine.currentThrottle == 0) return; SetFailedHighlight(); @@ -93,6 +94,10 @@ protected override void RepairPart() engine.thrustPercentage = 100; Debug.Log("[UPFM]: Reset Thrust on " + part.name); break; + case "Gimbal Failure": + gimbal.gimbalLock = false; + break; + default: return; } diff --git a/UPFM/Untitled Part Failure Mod/bin/Release/GameData/UntitledFailures/MM Patches/DontLeak.cfg b/UPFM/Untitled Part Failure Mod/bin/Release/GameData/UntitledFailures/MM Patches/DontLeak.cfg index bbe3315..dcfc5f0 100644 --- a/UPFM/Untitled Part Failure Mod/bin/Release/GameData/UntitledFailures/MM Patches/DontLeak.cfg +++ b/UPFM/Untitled Part Failure Mod/bin/Release/GameData/UntitledFailures/MM Patches/DontLeak.cfg @@ -21,4 +21,9 @@ BLACKLISTED BLACKLISTED { name = IntakeAir +} + +BLACKLISTED +{ + name = SolidFuel } \ No newline at end of file