private void onVesselModified(Vessel v) { if (v == null) { return; } if (v != vessel) { return; } maxVesselEC = SEP_Utilities.getMaxTotalVesselEC(v.protoVessel); _ectotal = getECString(); }
public SEP_VesselSection(Vessel v) { if (SEP_Controller.Instance == null) { return; } if (v == null) { return; } vessel = v; _name = v.vesselName; experiments = SEP_Controller.Instance.getHandlers(v); _transmitavailable = SEP_Controller.Instance.TransmissionUpdgrade; _cantransmit = experiments.Any(e => e.controllerAutoTransmit); currentVesselEC = SEP_Utilities.getTotalVesselEC(v.protoVessel); maxVesselEC = SEP_Utilities.getMaxTotalVesselEC(v.protoVessel); _ectotal = getECString(); _situation = getSituationString(); experimentSections = new List <SEP_ExperimentSection>(); addExperimentSections(); _expcount = getExpCountString(); GameEvents.onVesselWasModified.Add(onVesselModified); GameEvents.onVesselSituationChange.Add(onVesselSituationChange); SEP_Utilities.onExperimentActivate.Add(onAddExperiment); SEP_Utilities.onExperimentDeactivate.Add(onRemoveExperiment); }