-
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.
- Loading branch information
1 parent
1990329
commit 142b384
Showing
10 changed files
with
294 additions
and
100 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace SandSpace | ||
{ | ||
public static class Extensions | ||
{ | ||
public static float Distance (this Vector3 vector1, Vector3 vector2) | ||
{ | ||
return (vector1 - vector2).magnitude; | ||
} | ||
|
||
public static T RemoveFirst<T> (this List<T> list) | ||
{ | ||
if (list == null || list.Count == 0) | ||
return default; | ||
|
||
var index = 0; | ||
var result = list[index]; | ||
list.RemoveAt (index); | ||
|
||
return result; | ||
} | ||
|
||
public static T RemoveLast<T> (this List<T> list) | ||
{ | ||
if (list == null || list.Count == 0) | ||
return default; | ||
|
||
var index = list.Count - 1; | ||
var result = list[index]; | ||
list.RemoveAt (index); | ||
|
||
return result; | ||
} | ||
} | ||
} |
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
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,6 +1,6 @@ | ||
using HarmonyLib; | ||
|
||
namespace SandSpace.Patches | ||
namespace SandSpace | ||
{ | ||
internal class StrikeCraftPatches | ||
{ | ||
|
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,84 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{4BFDFA3C-6EA6-4BB7-B82A-B6C55ECF1DE5}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>SandSpace</RootNamespace> | ||
<AssemblyName>SandSpace</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo> | ||
<TargetFramework>net35</TargetFramework> | ||
<OutputPath>$(SolutionDir)bin\</OutputPath> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony"> | ||
<HintPath>..\lib\0Harmony.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp"> | ||
<HintPath>..\lib\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\lib\Newtonsoft.Json.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>..\lib\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UI"> | ||
<HintPath>..\lib\UnityEngine.UI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityModManager"> | ||
<HintPath>..\lib\UnityModManager.dll</HintPath> | ||
<Private>False</Private> | ||
<Reference Include="..\lib\*.dll"> | ||
<Private>false</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Hooks\GameStartOrLoadHook.cs" /> | ||
<Compile Include="Patches\BigShipsPatches.cs" /> | ||
<Compile Include="Patches\HangarsPatches.cs" /> | ||
<Compile Include="Patches\HazardPatches.cs" /> | ||
<Compile Include="Hooks\MainMenuHook.cs" /> | ||
<Compile Include="Patches\NewGamePatches.cs" /> | ||
<Compile Include="Patches\ResourcesPatces.cs" /> | ||
<Compile Include="Patches\ShipPartsPatches.cs" /> | ||
<Compile Include="Patches\StrikeCraftPatches.cs" /> | ||
<Compile Include="PatchingExtension.cs" /> | ||
<Compile Include="SandSpaceMod.cs" /> | ||
<Compile Include="Patches\PerkPatches.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Settings.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="README.md" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>copy /Y "$(TargetDir)$(ProjectName).dll" "D:\Steam\steamapps\common\SPAZ2\Mods\SandSpace\$(ProjectName).dll"</PostBuildEvent> | ||
<PostBuildEvent>copy /Y "$(OutputPath)$(AssemblyName).dll" "D:\Steam\steamapps\common\SPAZ2\Mods\SandSpace\$(AssemblyName).dll"</PostBuildEvent> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<DebugType>portable</DebugType> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DebugType>portable</DebugType> | ||
</PropertyGroup> | ||
</Project> | ||
</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
Oops, something went wrong.