Skip to content

Move PluginHelper.getPluginSaveFile() outside loop #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FNPlugin/MicrowavePowerReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ public override void OnStart(PartModule.StartState state) {
}
vmps = new List<VesselMicrowavePersistence>();
vrps = new List<VesselRelayPersistence>();
ConfigNode config = PluginHelper.getPluginSaveFile();
foreach (Vessel vess in FlightGlobals.Vessels) {
String vesselID = vess.id.ToString();

if (vess.isActiveVessel == false && vess.vesselName.ToLower().IndexOf("debris") == -1) {
ConfigNode config = PluginHelper.getPluginSaveFile();
if (config.HasNode("VESSEL_MICROWAVE_POWER_" + vesselID)) {
ConfigNode power_node = config.GetNode("VESSEL_MICROWAVE_POWER_" + vesselID);
double nuclear_power = 0;
Expand Down