Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisAdderley committed Dec 26, 2015
1 parent 095e54c commit 3f4b4f9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
Binary file modified GameData/NearFutureSolar/Plugins/NearFutureSolar.dll
Binary file not shown.
15 changes: 12 additions & 3 deletions Source/ModuleCurvedSolarPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public class ModuleCurvedSolarPanel:PartModule
// ACTIONS
// -----------------
// Deploy Panels
[KSPEvent(guiActive = true, guiName = "Deploy Panel", active = true)]
[KSPEvent(guiActive = true, guiName = "Deploy Panel", active = true, guiActiveEditor = true)]
public void DeployPanels()
{
Deploy();

}
// Retract Panels
[KSPEvent(guiActive = true, guiName = "Retract Panel", active = false)]
[KSPEvent(guiActive = true, guiName = "Retract Panel", active = false, guiActiveEditor = true)]
public void RetractPanels()
{
Retract();
Expand Down Expand Up @@ -216,7 +216,7 @@ public void FixedUpdate()
{
if (flight)
{
if (!Deployable || (Deployable && (State == ModuleDeployableSolarPanel.panelStates.EXTENDED )))
if (!Deployable || (Deployable && (State == ModuleDeployableSolarPanel.panelStates.EXTENDED ) ))
{
sunExposure = 0f;
energyFlow = 0f;
Expand Down Expand Up @@ -271,6 +271,15 @@ public void FixedUpdate()
}

part.RequestResource(ResourceName, (-realFlow) * TimeWarp.fixedDeltaTime);
} else if (Deployable && (State == ModuleDeployableSolarPanel.panelStates.BROKEN ))
{
SunExposure = "Broken!";
EnergyFlow = "Panels Retracted";
}
else if (Deployable && (State == ModuleDeployableSolarPanel.panelStates.RETRACTED))
{
SunExposure = "Panels Retracted";
EnergyFlow = "Panels Retracted";
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/NearFutureSolar.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\GameData\NearFutureSolar\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
20 changes: 20 additions & 0 deletions Source/NearFutureSolar.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NearFutureSolar", "NearFutureSolar.csproj", "{67E18829-705E-4E94-BD9A-6987F0C3C5D1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67E18829-705E-4E94-BD9A-6987F0C3C5D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67E18829-705E-4E94-BD9A-6987F0C3C5D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67E18829-705E-4E94-BD9A-6987F0C3C5D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67E18829-705E-4E94-BD9A-6987F0C3C5D1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

0 comments on commit 3f4b4f9

Please sign in to comment.