forked from NebulaModTeam/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NebulaModTeam#615 from PhantomGamers/cleanup-pr
- Loading branch information
Showing
613 changed files
with
416,776 additions
and
136,069 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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.5.7" IncludeAssets="compile" PrivateAssets="all" | ||
Condition=" '$(MSBuildProjectName)' != 'NebulaAPI' "/> | ||
|
||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" 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.DataStructures; | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#region | ||
|
||
using UnityEngine; | ||
|
||
#endregion | ||
|
||
namespace NebulaAPI.DataStructures; | ||
|
||
public static class DataStructureExtensions | ||
{ | ||
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); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.