Skip to content

Commit

Permalink
Update to 0.17.1557 (by ILSpy 3.0 preview 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
duduluu committed Oct 22, 2017
1 parent b959e8c commit 464c0e0
Show file tree
Hide file tree
Showing 3,332 changed files with 68,067 additions and 62,196 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
73 changes: 73 additions & 0 deletions Assembly-CSharp/-PrivateImplementationDetails-.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[CompilerGenerated]
internal class _003CPrivateImplementationDetails_003E
{
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 20)]
private struct _0024ArrayType_002420
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 32)]
private struct _0024ArrayType_002432
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 36)]
private struct _0024ArrayType_002436
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)]
private struct _0024ArrayType_002416
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 64)]
private struct _0024ArrayType_002464
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 24)]
private struct _0024ArrayType_002424
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 12)]
private struct _0024ArrayType_002412
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 40)]
private struct _0024ArrayType_002440
{
}

[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 8192)]
private struct _0024ArrayType_00248192
{
}

internal static _0024ArrayType_002420 _0024_0024field_002D0;

internal static _0024ArrayType_002432 _0024_0024field_002D1;

internal static _0024ArrayType_002436 _0024_0024field_002D2;

internal static _0024ArrayType_002416 _0024_0024field_002D3;

internal static _0024ArrayType_002464 _0024_0024field_002D4;

internal static _0024ArrayType_002416 _0024_0024field_002D5;

internal static _0024ArrayType_002424 _0024_0024field_002D6;

internal static _0024ArrayType_002412 _0024_0024field_002D7;

internal static _0024ArrayType_002412 _0024_0024field_002D8;

internal static _0024ArrayType_002440 _0024_0024field_002D9;

internal static _0024ArrayType_00248192 _0024_0024field_002D10;
}
71 changes: 31 additions & 40 deletions Assembly-CSharp/Assembly-CSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8EF1BBB4-A18A-4B64-B581-3E19C4D7B030}</ProjectGuid>
<ProjectGuid>{7E232168-7164-4790-9EA5-47D5BE405A8F}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<AssemblyName>Assembly-CSharp</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -25,8 +26,35 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>D:\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="System.Core">
<HintPath>C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll</HintPath>
</Reference>
<Reference Include="System.Xml">
<HintPath>C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq">
<HintPath>C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll</HintPath>
</Reference>
<Reference Include="NAudio">
<HintPath>D:\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin_Data\Managed\NAudio.dll</HintPath>
</Reference>
<Reference Include="NVorbis">
<HintPath>D:\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin_Data\Managed\NVorbis.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="-PrivateImplementationDetails-.cs" />
<Compile Include="D:\git\rw\RimWorld-Decompile\Assembly-CSharp\Properties\AssemblyInfo.cs" />
<Compile Include="NVorbis.NAudioSupport\VorbisWaveReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RimWorld.BaseGen\BaseGen.cs" />
<Compile Include="RimWorld.BaseGen\BaseGenUtility.cs" />
<Compile Include="RimWorld.BaseGen\GlobalSettings.cs" />
Expand Down Expand Up @@ -3427,42 +3455,5 @@
<Compile Include="Verse\ZoneMaker.cs" />
<Compile Include="Verse\ZoneManager.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Mono.Posix.dll</HintPath>
</Reference>
<Reference Include="Mono.Security">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="NAudio">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\NAudio.dll</HintPath>
</Reference>
<Reference Include="NVorbis">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\NVorbis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\System.Core.dll</HintPath>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\System.Xml.Linq.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>D:\Game\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
18 changes: 7 additions & 11 deletions Assembly-CSharp/NVorbis.NAudioSupport/VorbisWaveReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ public override long Position
}
set
{
if (value < 0L || value > this.Length)
if (value >= 0 && value <= this.Length)
{
throw new ArgumentOutOfRangeException("value");
this._reader.DecodedTime = TimeSpan.FromSeconds((double)value / (double)this._reader.SampleRate / (double)this._reader.Channels / 4.0);
return;
}
this._reader.DecodedTime = TimeSpan.FromSeconds((double)value / (double)this._reader.SampleRate / (double)this._reader.Channels / 4.0);
throw new ArgumentOutOfRangeException("value");
}
}

Expand Down Expand Up @@ -77,11 +78,11 @@ public int CurrentStream
{
if (!this._reader.SwitchStreams(value))
{
throw new NVorbis.InvalidDataException("The selected stream is not a valid Vorbis stream!");
throw new InvalidDataException("The selected stream is not a valid Vorbis stream!");
}
if (this.NextStreamIndex.HasValue && value == this.NextStreamIndex.Value)
{
this.NextStreamIndex = null;
this.NextStreamIndex = default(int?);
}
}
}
Expand Down Expand Up @@ -168,12 +169,7 @@ public override int Read(byte[] buffer, int offset, int count)
{
count /= 4;
count -= count % this._reader.Channels;
float[] arg_2E_0;
if ((arg_2E_0 = VorbisWaveReader._conversionBuffer) == null)
{
arg_2E_0 = (VorbisWaveReader._conversionBuffer = new float[count]);
}
float[] array = arg_2E_0;
float[] array = VorbisWaveReader._conversionBuffer ?? (VorbisWaveReader._conversionBuffer = new float[count]);
if (array.Length < count)
{
array = (VorbisWaveReader._conversionBuffer = new float[count]);
Expand Down
5 changes: 2 additions & 3 deletions Assembly-CSharp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: AssemblyVersion("0.17.6362.34601")]
[assembly: AssemblyCompany("Ludeon Studios")]
[assembly: AssemblyCopyright("Copyright Ludeon Studios.")]
[assembly: AssemblyTrademark("RimWorld is a registered trademark of Ludeon Studios.")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyCompany("Ludeon Studios")]
[assembly: AssemblyVersion("0.17.6362.34601")]
123 changes: 60 additions & 63 deletions Assembly-CSharp/RimWorld.BaseGen/BaseGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void Reset()
List<RuleDef> allDefsListForReading = DefDatabase<RuleDef>.AllDefsListForReading;
for (int i = 0; i < allDefsListForReading.Count; i++)
{
List<RuleDef> list;
List<RuleDef> list = default(List<RuleDef>);
if (!BaseGen.rulesBySymbol.TryGetValue(allDefsListForReading[i].symbol, out list))
{
list = new List<RuleDef>();
Expand All @@ -39,65 +39,66 @@ public static void Generate()
if (BaseGen.working)
{
Log.Error("Cannot call Generate() while already generating. Nested calls are not allowed.");
return;
}
BaseGen.working = true;
try
else
{
if (BaseGen.symbolStack.Empty)
BaseGen.working = true;
try
{
Log.Warning("Symbol stack is empty.");
}
else if (BaseGen.globalSettings.map == null)
{
Log.Error("Called BaseGen.Resolve() with null map.");
}
else
{
int num = BaseGen.symbolStack.Count - 1;
int num2 = 0;
while (!BaseGen.symbolStack.Empty)
if (BaseGen.symbolStack.Empty)
{
num2++;
if (num2 > 100000)
{
Log.Error("Error in BaseGen: Too many iterations. Infinite loop?");
break;
}
Pair<string, ResolveParams> toResolve = BaseGen.symbolStack.Pop();
if (BaseGen.symbolStack.Count == num)
{
BaseGen.globalSettings.mainRect = toResolve.Second.rect;
num--;
}
try
{
BaseGen.Resolve(toResolve);
}
catch (Exception ex)
Log.Warning("Symbol stack is empty.");
}
else if (BaseGen.globalSettings.map == null)
{
Log.Error("Called BaseGen.Resolve() with null map.");
}
else
{
int num = BaseGen.symbolStack.Count - 1;
int num2 = 0;
while (true)
{
Log.Error(string.Concat(new object[]
if (!BaseGen.symbolStack.Empty)
{
"Error while resolving symbol \"",
toResolve.First,
"\" with params=",
toResolve.Second,
"\n\nException: ",
ex
}));
num2++;
if (num2 <= 100000)
{
Pair<string, ResolveParams> toResolve = BaseGen.symbolStack.Pop();
if (BaseGen.symbolStack.Count == num)
{
GlobalSettings obj = BaseGen.globalSettings;
ResolveParams second = toResolve.Second;
obj.mainRect = second.rect;
num--;
}
try
{
BaseGen.Resolve(toResolve);
}
catch (Exception ex)
{
Log.Error("Error while resolving symbol \"" + toResolve.First + "\" with params=" + toResolve.Second + "\n\nException: " + ex);
}
continue;
}
break;
}
return;
}
Log.Error("Error in BaseGen: Too many iterations. Infinite loop?");
}
}
}
catch (Exception arg)
{
Log.Error("Error in BaseGen: " + arg);
}
finally
{
BaseGen.working = false;
BaseGen.symbolStack.Clear();
BaseGen.globalSettings.Clear();
catch (Exception arg)
{
Log.Error("Error in BaseGen: " + arg);
}
finally
{
BaseGen.working = false;
BaseGen.symbolStack.Clear();
BaseGen.globalSettings.Clear();
}
}
}

Expand All @@ -106,7 +107,7 @@ private static void Resolve(Pair<string, ResolveParams> toResolve)
string first = toResolve.First;
ResolveParams second = toResolve.Second;
BaseGen.tmpResolvers.Clear();
List<RuleDef> list;
List<RuleDef> list = default(List<RuleDef>);
if (BaseGen.rulesBySymbol.TryGetValue(first, out list))
{
for (int i = 0; i < list.Count; i++)
Expand All @@ -122,19 +123,15 @@ private static void Resolve(Pair<string, ResolveParams> toResolve)
}
}
}
if (!BaseGen.tmpResolvers.Any<SymbolResolver>())
if (!BaseGen.tmpResolvers.Any())
{
Log.Warning(string.Concat(new object[]
{
"Could not find any RuleDef for symbol \"",
first,
"\" with any resolver that could resolve ",
second
}));
return;
Log.Warning("Could not find any RuleDef for symbol \"" + first + "\" with any resolver that could resolve " + second);
}
else
{
SymbolResolver symbolResolver2 = BaseGen.tmpResolvers.RandomElementByWeight((Func<SymbolResolver, float>)((SymbolResolver x) => x.selectionWeight));
symbolResolver2.Resolve(second);
}
SymbolResolver symbolResolver2 = BaseGen.tmpResolvers.RandomElementByWeight((SymbolResolver x) => x.selectionWeight);
symbolResolver2.Resolve(second);
}
}
}
Loading

0 comments on commit 464c0e0

Please sign in to comment.