private void ApplyLateSpecifics(PartModule module, bool enable) { // Update staging icon visibility if (disableModule && module.IsStageable()) { module.stagingEnabled = !enable; module.part.UpdateStageability(false, true); } if (!(disableModule && enable)) { // Unfortunatly ModuleDataTransmitter OnLoad create the reshandler on the prefab // and never again because it checks for part.partInfo == null if (module is ModuleDataTransmitter && module.resHandler.inputResources.Count == 0) { string value = "ElectricCharge"; if (modifiersNode != null && !modifiersNode.TryGetValue("requiredResource", ref value)) { moduleNode.TryGetValue("requiredResource", ref value); } ModuleResource moduleResource = new ModuleResource(); moduleResource.name = value; moduleResource.title = KSPUtil.PrintModuleName(value); moduleResource.id = value.GetHashCode(); moduleResource.rate = 1.0; module.resHandler.inputResources.Add(moduleResource); } else if (module is ModuleEngines && HighLogic.LoadedSceneIsFlight) { FixEnginesFX((ModuleEngines)module); } } }