public SatSettingNode(PartModule m) { this.partModule = m; isLoaded = true; if (RTUtils.containsField(partModule, "pointedAt")) { this.pointedAt = new Target((string)partModule.Fields.GetValue("pointedAt")); } else { this.pointedAt = new Target(); } if (RTUtils.containsField(partModule, "dishRange")) { this.dishRange = (float)partModule.Fields.GetValue("dishRange"); } else { this.dishRange = 0; } if (RTUtils.containsField(partModule, "antennaName")) { this.antennaName = (string)partModule.Fields.GetValue("antennaName"); } for (int i = 0; i < RTGlobals.targets.Count; i++) { if (pointedAt.Equals(RTGlobals.targets[i])) { selectedTarget = i; break; } } }