-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a176856
commit 888e229
Showing
600 changed files
with
32,432 additions
and
30,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<DevEnvLoc>$(MSBuildThisFileDirectory)DevEnv.targets</DevEnvLoc> | ||
</PropertyGroup> | ||
|
||
<!-- This sets $(DSPGameDir) --> | ||
<Import Project="$(DevEnvLoc)" Condition="Exists('$(DevEnvLoc)')" /> | ||
|
||
<PropertyGroup Label="Game Install Properties"> | ||
<DSPGameDir Condition="!Exists('$(DevEnvLoc)')">C:\Program Files (x86)\Steam\steamapps\common\Dyson Sphere Program\</DSPGameDir> | ||
<DSPGameDir>$([MSBuild]::EnsureTrailingSlash('$(DSPGameDir)'))</DSPGameDir> | ||
<PluginOutputDirectory>$(DSPGameDir)BepInEx\plugins\nebula-NebulaMultiplayerMod\</PluginOutputDirectory> | ||
<PropSheetPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</PropSheetPath> | ||
<PluginOutputDirectory Condition="Exists('$(PropSheetPath).remoteBuild')">$(PropSheetPath)dist\release\nebula-NebulaMultiplayerMod\</PluginOutputDirectory> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="Common Properties"> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
|
||
<OutputPath Condition="Exists('$(DSPGameDir)') Or Exists('$(PropSheetPath).remoteBuild')">$(PluginOutputDirectory)</OutputPath> | ||
<TargetFramework>net472</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);*.binlog</DefaultItemExcludes> | ||
|
||
<DebugType>portable</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="API Properties" Condition=" '$(MSBuildProjectName)' == 'NebulaAPI' " > | ||
<OutputPath Condition="Exists('$(DSPGameDir)') Or Exists('$(PropSheetPath).remoteBuild')">$(OutputPath)..\nebula-NebulaMultiplayerModApi</OutputPath> | ||
</PropertyGroup> | ||
<!-- Shared Items --> | ||
<ItemGroup Label="NuGets"> | ||
<PackageReference Include="Microsoft.Unity.Analyzers" Version="1.*" PrivateAssets="all" /> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.*" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="NuGetsMain" Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' "> | ||
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="Core"> | ||
<PackageReference Include="BepInEx.Core" Version="5.*" PrivateAssets="all" /> | ||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" PrivateAssets="all" /> | ||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-*" IncludeAssets="compile" PrivateAssets="all" /> | ||
<PackageReference Include="DysonSphereProgram.Modding.CommonAPI" Version="1.4.5" IncludeAssets="compile" PrivateAssets="all" | ||
Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' " /> | ||
|
||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<DevEnvLoc>$(MSBuildThisFileDirectory)DevEnv.targets</DevEnvLoc> | ||
</PropertyGroup> | ||
|
||
<!-- This sets $(DSPGameDir) --> | ||
<Import Project="$(DevEnvLoc)" Condition="Exists('$(DevEnvLoc)')"/> | ||
|
||
<PropertyGroup Label="Game Install Properties"> | ||
<DSPGameDir Condition="!Exists('$(DevEnvLoc)')">C:\Program Files (x86)\Steam\steamapps\common\Dyson Sphere Program\</DSPGameDir> | ||
<DSPGameDir>$([MSBuild]::EnsureTrailingSlash('$(DSPGameDir)'))</DSPGameDir> | ||
<PluginOutputDirectory>$(DSPGameDir)BepInEx\plugins\nebula-NebulaMultiplayerMod\</PluginOutputDirectory> | ||
<PropSheetPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</PropSheetPath> | ||
<PluginOutputDirectory Condition="Exists('$(PropSheetPath).remoteBuild')">$(PropSheetPath)dist\release\nebula-NebulaMultiplayerMod\</PluginOutputDirectory> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="Common Properties"> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
|
||
<OutputPath Condition="Exists('$(DSPGameDir)') Or Exists('$(PropSheetPath).remoteBuild')">$(PluginOutputDirectory)</OutputPath> | ||
<TargetFramework>net472</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<DefaultItemExcludes>$(DefaultItemExcludes);*.binlog</DefaultItemExcludes> | ||
|
||
<DebugType>portable</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="API Properties" Condition=" '$(MSBuildProjectName)' == 'NebulaAPI' "> | ||
<OutputPath Condition="Exists('$(DSPGameDir)') Or Exists('$(PropSheetPath).remoteBuild')">$(OutputPath)..\nebula-NebulaMultiplayerModApi</OutputPath> | ||
</PropertyGroup> | ||
|
||
<!-- Shared Items --> | ||
<ItemGroup Label="NuGets"> | ||
<PackageReference Include="Microsoft.Unity.Analyzers" Version="1.*" PrivateAssets="all"/> | ||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.*" PrivateAssets="all"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="NuGetsMain" Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' "> | ||
<PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.*"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="Core"> | ||
<PackageReference Include="BepInEx.Core" Version="5.*" PrivateAssets="all"/> | ||
<PackageReference Include="UnityEngine.Modules" Version="2018.4.12" IncludeAssets="compile" PrivateAssets="all"/> | ||
<PackageReference Include="DysonSphereProgram.GameLibs" Version="*-*" IncludeAssets="compile" PrivateAssets="all"/> | ||
<PackageReference Include="DysonSphereProgram.Modding.CommonAPI" Version="1.4.5" IncludeAssets="compile" PrivateAssets="all" | ||
Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' "/> | ||
|
||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildThisFileDirectory)SharedConfig.targets"/> | ||
<Import Project="$(MSBuildThisFileDirectory)SharedConfig.targets"/> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
using System; | ||
#region | ||
|
||
using System; | ||
using System.Collections; | ||
using System.Threading; | ||
|
||
namespace NebulaAPI | ||
#endregion | ||
|
||
namespace NebulaAPI; | ||
|
||
public static class CollectionExtensions | ||
{ | ||
public static class CollectionExtensions | ||
public static Locker Lock(this ICollection collection) | ||
{ | ||
public static Locker Lock(this ICollection collection) | ||
{ | ||
return new Locker(collection.SyncRoot); | ||
} | ||
|
||
public static Locker GetLocked<T>(this T collection, out T result) where T : ICollection | ||
{ | ||
result = collection; | ||
return new Locker(collection.SyncRoot); | ||
} | ||
return new Locker(collection.SyncRoot); | ||
} | ||
|
||
public readonly struct Locker : IDisposable | ||
public static Locker GetLocked<T>(this T collection, out T result) where T : ICollection | ||
{ | ||
private readonly object lockObject; | ||
result = collection; | ||
return new Locker(collection.SyncRoot); | ||
} | ||
} | ||
|
||
public Locker(object lockObject) | ||
{ | ||
this.lockObject = lockObject; | ||
public readonly struct Locker : IDisposable | ||
{ | ||
private readonly object lockObject; | ||
|
||
Monitor.Enter(lockObject); | ||
} | ||
public Locker(object lockObject) | ||
{ | ||
this.lockObject = lockObject; | ||
|
||
public void Dispose() | ||
{ | ||
Monitor.Exit(lockObject); | ||
} | ||
Monitor.Enter(lockObject); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
Monitor.Exit(lockObject); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
using UnityEngine; | ||
#region | ||
|
||
namespace NebulaAPI | ||
using UnityEngine; | ||
|
||
#endregion | ||
|
||
namespace NebulaAPI; | ||
|
||
public static class DataStructureExtenstions | ||
{ | ||
public static class DataStructureExtenstions | ||
public static Vector3 ToVector3(this Float3 value) | ||
{ | ||
return new Vector3(value.x, value.y, value.z); | ||
} | ||
|
||
public static VectorLF3 ToVectorLF3(this Double3 value) | ||
{ | ||
return new VectorLF3(value.x, value.y, value.z); | ||
} | ||
|
||
public static Float3 ToFloat3(this Vector3 value) | ||
{ | ||
return new Float3(value.x, value.y, value.z); | ||
} | ||
|
||
public static Quaternion ToQuaternion(this Float4 value) | ||
{ | ||
return new Quaternion(value.x, value.y, value.z, value.w); | ||
} | ||
|
||
public static Float4 ToFloat4(this Quaternion value) | ||
{ | ||
public static Vector3 ToVector3(this Float3 value) | ||
{ | ||
return new Vector3(value.x, value.y, value.z); | ||
} | ||
|
||
public static VectorLF3 ToVectorLF3(this Double3 value) | ||
{ | ||
return new VectorLF3(value.x, value.y, value.z); | ||
} | ||
|
||
public static Float3 ToFloat3(this Vector3 value) | ||
{ | ||
return new Float3(value.x, value.y, value.z); | ||
} | ||
|
||
public static Quaternion ToQuaternion(this Float4 value) | ||
{ | ||
return new Quaternion(value.x, value.y, value.z, value.w); | ||
} | ||
|
||
public static Float4 ToFloat4(this Quaternion value) | ||
{ | ||
return new Float4(value.x, value.y, value.z, value.w); | ||
} | ||
return new Float4(value.x, value.y, value.z, value.w); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
| ||
namespace NebulaAPI | ||
namespace NebulaAPI; | ||
|
||
[RegisterNestedType] | ||
public struct Double3 : INetSerializable | ||
{ | ||
[RegisterNestedType] | ||
public struct Double3 : INetSerializable | ||
{ | ||
public double x; | ||
public double y; | ||
public double z; | ||
public double x; | ||
public double y; | ||
public double z; | ||
|
||
public Double3(double x, double y, double z) | ||
{ | ||
this.x = x; | ||
this.y = y; | ||
this.z = z; | ||
} | ||
public Double3(double x, double y, double z) | ||
{ | ||
this.x = x; | ||
this.y = y; | ||
this.z = z; | ||
} | ||
|
||
public void Serialize(INetDataWriter writer) | ||
{ | ||
writer.Put(x); | ||
writer.Put(y); | ||
writer.Put(z); | ||
} | ||
public void Serialize(INetDataWriter writer) | ||
{ | ||
writer.Put(x); | ||
writer.Put(y); | ||
writer.Put(z); | ||
} | ||
|
||
public void Deserialize(INetDataReader reader) | ||
{ | ||
x = reader.GetDouble(); | ||
y = reader.GetDouble(); | ||
z = reader.GetDouble(); | ||
} | ||
public void Deserialize(INetDataReader reader) | ||
{ | ||
x = reader.GetDouble(); | ||
y = reader.GetDouble(); | ||
z = reader.GetDouble(); | ||
} | ||
|
||
|
||
public override string ToString() | ||
{ | ||
return $"x: {x}, y: {y}, z: {z}"; | ||
} | ||
public override string ToString() | ||
{ | ||
return $"x: {x}, y: {y}, z: {z}"; | ||
} | ||
} |
Oops, something went wrong.