public static void updatePartResourceDisplay(Part part)
{
if (HighLogic.LoadedSceneIsEditor && EditorLogic.fetch == null) { return; }
if (HighLogic.LoadedSceneIsFlight && FlightDriver.fetch == null) { return; }
try
{
if (UIPartActionController.Instance != null)
{
UIPartActionWindow window = UIPartActionController.Instance.GetItem(part);
if (window != null) { window.displayDirty = true; }
}
}
catch (Exception e)
{
MonoBehaviour.print("ERROR: Caught exception while updating part resource display: " + e.Message);
}
}