Skip to content

Commit

Permalink
More debug cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvanderbeck committed Jan 11, 2015
1 parent e9699a4 commit 41a5b8a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions TestFlightAPI/TestFlightAPI/TestFlightFailure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ public override void OnStart(StartState state)
{
if (repairConfig == null && repairConfigString.Length > 0)
{
Debug.Log("TestFlightFailureBase: Restoring from packed string");
repairConfig = RepairConfig.FromString(repairConfigString);
}
base.OnStart(state);
Expand All @@ -332,7 +331,6 @@ public override void OnLoad(ConfigNode node)
{
if (node.HasNode("REPAIR"))
{
Debug.Log("TestFlightFailureBase: Loading REPAIR node");
repairConfig = new RepairConfig();
repairConfig.Load(node.GetNode("REPAIR"));
repairConfigString = repairConfig.ToString();
Expand Down
3 changes: 0 additions & 3 deletions TestFlightCore/TestFlightCore/TestFlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ internal override void Update()
// Poll for flight data and part status
if (currentUTC >= lastDataPoll + tfScenario.settings.minTimeBetweenDataPoll)
{
LogFormatted_DebugOnly("TestFlightManager: Updating part " + part.partInfo.title);
DoFlightUpdate(core, entry.Value);
TestFlightData currentFlightData = DoDataUpdate(core, part);

Expand Down Expand Up @@ -558,7 +557,6 @@ public void SetFlightDataForPartName(string partName, PartFlightData data)
public override void OnLoad(ConfigNode node)
{
base.OnLoad(node);
Debug.Log("TestFlightManagerScenario: OnLoad");
if (settings != null)
{
settings.Load();
Expand All @@ -580,7 +578,6 @@ public override void OnLoad(ConfigNode node)

public override void OnSave(ConfigNode node)
{
Debug.Log("TestFlightManagerScenario: OnSave");
base.OnSave(node);
if (settings != null)
{
Expand Down
5 changes: 0 additions & 5 deletions TestFlightCore/TestFlightCore/TestFlightCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ public override void OnStart(StartState state)
failureModules.Clear();
foreach(PartModule pm in this.part.Modules)
{
LogFormatted_DebugOnly("TestFlightCore: Inspecting Module " + pm.moduleName + " for ITestFlightFailure interface");
ITestFlightFailure failureModule = pm as ITestFlightFailure;
if (failureModule != null)
{
LogFormatted_DebugOnly("TestFlightCore: Added Failure Module " + pm.moduleName);
failureModules.Add(failureModule);
}
}
Expand Down Expand Up @@ -342,7 +340,6 @@ public virtual bool DoFailureCheck(double missionStartTime, double globalReliabi
currentReliability = totalReliability * globalReliabilityModifier;
// Roll for failure
float roll = UnityEngine.Random.Range(0.0f,100.0f);
LogFormatted_DebugOnly("TestFlightCore: " + this.part.name + "(" + this.part.flightID + ") Reliability " + currentReliability + ", Failure Roll " + roll);
if (roll > currentReliability)
{
// Failure occurs. Determine which failure module to trigger
Expand All @@ -353,9 +350,7 @@ public virtual bool DoFailureCheck(double missionStartTime, double globalReliabi
{
totalWeight += fm.GetFailureDetails().weight;
}
LogFormatted_DebugOnly("TestFlightCore: Total Weight " + totalWeight);
chosenWeight = UnityEngine.Random.Range(1,totalWeight);
LogFormatted_DebugOnly("TestFlightCore: Chosen Weight " + chosenWeight);
foreach(ITestFlightFailure fm in failureModules)
{
currentWeight += fm.GetFailureDetails().weight;
Expand Down

0 comments on commit 41a5b8a

Please sign in to comment.