Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions BindingsTerminalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ public class BindingsTerminalSettings : Binding
public override void AddTo(BindingManager manager)
{
manager.AddGetter("SESSIONTIME", delegate(CPU cpu) { return cpu.SessionTime; });

manager.AddGetter("VOLUME:SELECTED", delegate(CPU cpu)
{
// if the user hasn't selected another volume, name will remain empty
// return 1, as the user will still be on the default volume, 1
if (cpu.SelectedVolume.Name == null || cpu.SelectedVolume.Name.Length == 0) { return "1"; }
else { return cpu.SelectedVolume.Name; }
});
manager.AddGetter("VOLUME:FREESPACE", delegate(CPU cpu) { return cpu.SelectedVolume.GetFreeSpace(); });
}
}
}
7 changes: 5 additions & 2 deletions kOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Games\KSP220\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\..\..\..\..\KSP_win\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -43,7 +43,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\Lib\UnityEngine.dll</HintPath>
<HintPath>..\..\..\..\..\..\KSP_win\KSP_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -98,6 +98,9 @@
<ItemGroup>
<Compile Include="VesselUtils.cs" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>echo $(TargetPath)
Expand Down