diff --git a/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs b/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs index 8b9cfce..19efc47 100644 --- a/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs +++ b/UPFM/Untitled Part Failure Mod/BaseFailureModule.cs @@ -25,13 +25,13 @@ private void Start() part.AddModule("DontRecoverMe"); ScrapYardEvents.OnSYTrackerUpdated.Add(OnSYTrackerUpdated); Initialise(); - GameEvents.onStageActivate.Add(onStageActivate); + GameEvents.onLaunch.Add(onLaunch); } - private void onStageActivate(int data) + private void onLaunch(EventReport data) { PartModule dontRecover = part.FindModuleImplementing(); - if(dontRecover == null) return; + if (dontRecover == null) return; part.RemoveModule(dontRecover); Debug.Log("[UPFM]: " + part.name + "marked as recoverable"); } @@ -125,7 +125,7 @@ public void RepairChecks() private void OnDestroy() { - GameEvents.onStageActivate.Remove(onStageActivate); + GameEvents.onLaunch.Remove(onLaunch); if (ScrapYardEvents.OnSYTrackerUpdated == null) return; ScrapYardEvents.OnSYTrackerUpdated.Remove(OnSYTrackerUpdated); }