Skip to content

Commit

Permalink
Fix for KSP 1.0
Browse files Browse the repository at this point in the history
Fixed compile errors in ModuleRTDataTransmitter,
IScienceDataTransmitter.TransmitData needed a new function with a
callback. RemoteTech looks like it works under KSP 1.0, minimal testing
done.
  • Loading branch information
cybercritic committed Apr 28, 2015
1 parent 84e6787 commit 457427e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 11 deletions.
18 changes: 17 additions & 1 deletion src/RemoteTech/Modules/ModuleRTDataTransmitter.cs
Expand Up @@ -50,6 +50,20 @@ bool IScienceDataTransmitter.CanTransmit()
double IScienceDataTransmitter.DataResourceCost { get { return PacketResourceCost / PacketSize; } }
bool IScienceDataTransmitter.IsBusy() { return mBusy; }

//critic 1.0, need a new callback
private Callback CallBackFunction;

//critic 1.0, TransmitData needs this extra function with callback
void IScienceDataTransmitter.TransmitData(List<ScienceData> dataQueue, Callback NewCallBackFunction)
{
mQueue.AddRange(dataQueue);
if (!mBusy)
{
StartCoroutine(Transmit());
CallBackFunction = NewCallBackFunction;
}
}

void IScienceDataTransmitter.TransmitData(List<ScienceData> dataQueue)
{
mQueue.AddRange(dataQueue);
Expand Down Expand Up @@ -109,7 +123,9 @@ private IEnumerator Transmit()
ScreenMessages.PostScreenMessage(msg_status, true);
if (commStream != null)
{
commStream.StreamData(frame);
//critic, streamdata needs protovessel for 1.0
//commStream.StreamData(frame);
commStream.StreamData(frame,this.part.vessel.protoVessel);
}
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/RemoteTech/Properties/AssemblyInfo.cs
Expand Up @@ -36,8 +36,8 @@
// Don't include the patch revision in the AssemblyVersion - as this will break any dependent
// DLLs any time it changes. Breaking on a minor revision is probably acceptable - it's
// unlikely that there wouldn't be other breaking changes on a minor version change.
[assembly: AssemblyVersion("1.6")]
[assembly: AssemblyFileVersion("1.6.3")]
[assembly: AssemblyVersion("1.6.1")]
[assembly: AssemblyFileVersion("1.6.5")]

// Use KSPAssembly to allow other DLLs to make this DLL a dependency in a
// non-hacky way in KSP. Format is (AssemblyProduct, major, minor), and it
Expand Down
16 changes: 8 additions & 8 deletions src/RemoteTech/RemoteTech.csproj
Expand Up @@ -10,32 +10,33 @@
<AssemblyName>RemoteTech</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<Optimize>False</Optimize>
<OutputPath>..\..\GameData\RemoteTech\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<Optimize>True</Optimize>
<OutputPath>..\..\GameData\RemoteTech\Plugins\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>Assembly-CSharp.dll</HintPath>
<Private>False</Private>
<HintPath>..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -44,8 +45,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>UnityEngine.dll</HintPath>
<Private>False</Private>
<HintPath>..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Kerbal Space Program\KSP_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
15 changes: 15 additions & 0 deletions src/RemoteTech/RemoteTech.userprefs
@@ -0,0 +1,15 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.Workbench ActiveDocument="c:\Games\RemoteTech-master\src\RemoteTech\FlightComputer\RoverPIDController.cs">
<Files>
<File FileName="c:\Games\RemoteTech-master\src\RemoteTech\Modules\ModuleRTDataTransmitter.cs" Line="64" Column="14" />
<File FileName="SatelliteManager.cs" Line="155" Column="34" />
<File FileName="RTCore.cs" Line="58" Column="49" />
<File FileName="c:\Games\RemoteTech-master\src\RemoteTech\FlightComputer\RoverPIDController.cs" Line="21" Column="30" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>

0 comments on commit 457427e

Please sign in to comment.