public void LateUpdate() { /* 1.4 Addition * if (KCT_Utilities.CurrentGameIsMission()) * { * return; * } */ // FIXME really should run this only once, and then again on techlist change. // For now, spam per frame if (KSP.UI.Screens.RDController.Instance != null) { for (int i = KSP.UI.Screens.RDController.Instance.nodes.Count; i-- > 0;) { KSP.UI.Screens.RDNode node = KSP.UI.Screens.RDController.Instance.nodes[i]; if (node?.tech != null) { if (HasTechInList(node.tech.techID)) { node.graphics?.SetIconColor(XKCDColors.KSPNotSoGoodOrange); } // else reset? Bleh, why bother. } } } }
public void UpdateTechlistIconColor() { if (KSP.UI.Screens.RDController.Instance != null) { for (int i = KSP.UI.Screens.RDController.Instance.nodes.Count; i-- > 0;) { KSP.UI.Screens.RDNode node = KSP.UI.Screens.RDController.Instance.nodes[i]; if (node?.tech != null) { if (HasTechInList(node.tech.techID)) { node.graphics?.SetIconColor(XKCDColors.KSPNotSoGoodOrange); } // else reset? Bleh, why bother. } } } }