Skip to content

Commit

Permalink
Merge pull request #348 from MOARdV/master
Browse files Browse the repository at this point in the history
Urk.  Had some uncommitted files
  • Loading branch information
MOARdV committed Aug 25, 2015
2 parents 09d0b9d + 67bec5c commit 9505823
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion GameData/JSI/RasterPropMonitor/RasterPropMonitor.version
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"VERSION": {
"MAJOR": 0,
"MINOR": 22,
"PATCH": 1
"PATCH": 2
},
"KSP_VERSION": {
"MAJOR": 1,
Expand Down
11 changes: 5 additions & 6 deletions RasterPropMonitor/Core/RPMVesselComputer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,14 @@ public void Awake()
{
throw new Exception("RPMVesselComputer: GetComponent<Vessel>() returned null");
}

if (instances.ContainsKey(vessel.id))
{
JUtil.LogErrorMessage(this, "Awake for vessel {0} ({1}), but it's already in the dictionary.", (vessel == null) ? "(no name)" : vessel.vesselName, vessel.id);
JUtil.LogErrorMessage(this, "Awake for vessel {0} ({1}), but it's already in the dictionary.", (string.IsNullOrEmpty(vessel.vesselName)) ? "(no name)" : vessel.vesselName, vessel.id);
}
else
{
instances.Add(vessel.id, this);
JUtil.LogMessage(this, "Awake for vessel {0} ({1}).", (vessel == null) ? "(no name)" : vessel.vesselName, vessel.id);
JUtil.LogMessage(this, "Awake for vessel {0} ({1}).", (string.IsNullOrEmpty(vessel.vesselName)) ? "(no name)" : vessel.vesselName, vessel.id);
}

GameEvents.onGameSceneLoadRequested.Add(LoadSceneCallback);
Expand Down Expand Up @@ -447,7 +446,7 @@ public void Awake()

public void Start()
{
JUtil.LogMessage(this, "Start for vessel {0} ({1})", (vessel == null) ? "(no name)" : vessel.vesselName, vessel.id);
JUtil.LogMessage(this, "Start for vessel {0} ({1})", (string.IsNullOrEmpty(vessel.vesselName)) ? "(no name)" : vessel.vesselName, vessel.id);
navBall = FlightUIController.fetch.GetComponentInChildren<NavBall>();
if (standardAtmosphere < 0.0)
{
Expand All @@ -470,7 +469,7 @@ public void Start()

public void OnDestroy()
{
JUtil.LogMessage(this, "OnDestroy for vessel {0} ({1})", (vessel == null) ? "(no name)" : vessel.vesselName, vessel.id);
JUtil.LogMessage(this, "OnDestroy for vessel {0} ({1})", (string.IsNullOrEmpty(vessel.vesselName)) ? "(no name)" : vessel.vesselName, vessel.id);
GameEvents.onGameSceneLoadRequested.Remove(LoadSceneCallback);
GameEvents.onVesselChange.Remove(VesselChangeCallback);
GameEvents.onStageActivate.Remove(StageActivateCallback);
Expand All @@ -479,7 +478,7 @@ public void OnDestroy()

if (!instances.ContainsKey(vessel.id))
{
JUtil.LogErrorMessage(this, "OnDestroy for vessel {0}, but it's not in the dictionary.", (vessel == null) ? "(no name)" : vessel.vesselName);
JUtil.LogErrorMessage(this, "OnDestroy for vessel {0}, but it's not in the dictionary.", (string.IsNullOrEmpty(vessel.vesselName)) ? "(no name)" : vessel.vesselName);
}
else
{
Expand Down

0 comments on commit 9505823

Please sign in to comment.