diff --git a/GameData/Severedsolo/OhScrap/Changelog.cfg b/GameData/Severedsolo/OhScrap/Changelog.cfg index 3bb2720..296e148 100644 --- a/GameData/Severedsolo/OhScrap/Changelog.cfg +++ b/GameData/Severedsolo/OhScrap/Changelog.cfg @@ -2,12 +2,18 @@ KERBALCHANGELOG //Required to have this name { showChangelog = True //To show the changelog, this must be set to True modName = OhScrap //Add your mod's name here + VERSION //Declares a version node + { + version = 1.4.1 //Version number, numbers only with no spaces! + change = Fixed SRBs being allowed to fail during KRASH simulations + } + VERSION //Declares a version node { version = 1.4 //Version number, numbers only with no spaces! change = CKAN USERS ONLY: Kerbal Changelog by Benjamin Kerman is now a required dependency change = MANUALLY INSTALLED USERS: Kerbal Changelog by Benjamin Kerman is bundled as an optional (but recommended) mod. -change = Recompile against KSP 1.5.1 + change = Recompile against KSP 1.5.1 change = Failures will no longer be calculated per part. Instead, we'll take into account the overall reliability of the vessel, and use that to determine failure rates. (Ie, if you stick a bunch of really good parts on your rocket, and one really crappy one, the rocket will still be less prone to fail than one with all crappy parts). A really cool side effect of this, is that if you stage away your bad parts, your vessel will become more reliable overall (ie, you can have a bad launch vehicle, but a tried and tested payload, and once the launch vehicle is gone, the payload will be uber reliable). change = Failures will be rolled for constantly (but rate limited) instead of just on loading the vessel. At the moment, it's every 10 seconds in atmosphere for the first two minutes, every 2.5 minutes after that while in atmosphere (known as "plane mode") and every 30 kerbal minutes out of the atmosphere - to simulate the fact that things are much more likely to go wrong on launch. change = All of the above parameters can be edited in DefaultSettings.cfg which is located at OhScrap/PluginData diff --git a/GameData/Severedsolo/OhScrap/OhScrap.version b/GameData/Severedsolo/OhScrap/OhScrap.version index 5b6f671..8fe5f4f 100644 --- a/GameData/Severedsolo/OhScrap/OhScrap.version +++ b/GameData/Severedsolo/OhScrap/OhScrap.version @@ -11,14 +11,14 @@ { "MAJOR" : 1, "MINOR" : 4, - "PATCH" : 0, + "PATCH" : 1, "BUILD" : 0 }, "KSP_VERSION" : { "MAJOR" : 1, - "MINOR" : 4, - "PATCH" : 3 + "MINOR" : 5, + "PATCH" : 1 }, "KSP_VERSION_MIN" : { diff --git a/OhScrap/BaseFailureModule.cs b/OhScrap/BaseFailureModule.cs index dc4979c..009d414 100644 --- a/OhScrap/BaseFailureModule.cs +++ b/OhScrap/BaseFailureModule.cs @@ -153,8 +153,7 @@ public void Initialise() else safetyRating = 1; if (hasFailed) part.FindModuleImplementing().SetFailedHighlight(); ready = true; - if(HighLogic.LoadedScene == GameScenes.FLIGHT && isSRB && UPFMUtils.instance._randomiser.NextDouble() < chanceOfFailure) InvokeRepeating("FailPart", 0.5f, 0.5f); - + if(HighLogic.LoadedScene == GameScenes.FLIGHT && FailureAllowed() && isSRB && UPFMUtils.instance._randomiser.NextDouble() < chanceOfFailure) InvokeRepeating("FailPart", 0.5f, 0.5f); } private float CalculateInitialFailureRate() diff --git a/OhScrap/ModuleUPFMEvents.cs b/OhScrap/ModuleUPFMEvents.cs index 4653a85..7e2569c 100644 --- a/OhScrap/ModuleUPFMEvents.cs +++ b/OhScrap/ModuleUPFMEvents.cs @@ -37,10 +37,13 @@ public void RefreshPart() { if (!HighLogic.LoadedSceneIsEditor || refreshed) return; SYP = part.FindModuleImplementing(); + Debug.Log("[OhScrap]: Attempting to refresh part " + SYP.ID); if (SYP.TimesRecovered == 0) { SYP.MakeFresh(); + Debug.Log("[OhScrap]: Refreshed. New ID is " + SYP.ID); } + else Debug.Log("[OhScrap]: " + SYP.ID + " has been recovered " + SYP.TimesRecovered + " times. No need to refresh"); refreshed = true; }