Skip to content

Commit

Permalink
Release 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
severedsolo committed May 20, 2018
1 parent d9fa24d commit c702a97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GameData/Severedsolo/OhScrap/OhScrap.version
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"MAJOR" : 1,
"MINOR" : 3,
"PATCH" : 4,
"PATCH" : 5,
"BUILD" : 0
},
"KSP_VERSION" :
Expand Down
10 changes: 9 additions & 1 deletion OhScrap/BaseFailureModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private void Start()
//listen to ScrapYard Events so we can recalculate when needed
ScrapYardEvents.OnSYTrackerUpdated.Add(OnSYTrackerUpdated);
ScrapYardEvents.OnSYInventoryAppliedToVessel.Add(OnSYInventoryAppliedToVessel);
ScrapYardEvents.OnSYInventoryChanged.Add(OnSYInventoryChanged);
OhScrap = part.FindModuleImplementing<ModuleUPFMEvents>();
//refresh part if we are in the editor and parts never been used before (just returns if not)
OhScrap.RefreshPart();
Expand All @@ -82,7 +83,14 @@ private void Start()
GameEvents.onLaunch.Add(OnLaunch);

}


private void OnSYInventoryChanged(InventoryPart data0, bool data1)
{
willFail = false;
chanceOfFailure = baseChanceOfFailure;
Initialise();
}

// if SY applies inventory we reset the module as it could be a whole new part now.
private void OnSYInventoryAppliedToVessel()
{
Expand Down

0 comments on commit c702a97

Please sign in to comment.