This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
9 changed files
with
311 additions
and
2 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
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
14 changes: 14 additions & 0 deletions
14
Distance.ResearchAndDevelopment.Content/Distance.ResearchAndDevelopment.Content.projitems
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,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
<HasSharedItems>true</HasSharedItems> | ||
<SharedGUID>f6c2c5dd-2f7c-4423-a3bd-d54f3fa8e6c9</SharedGUID> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Configuration"> | ||
<Import_RootNamespace>Distance.ResearchAndDevelopment.Content</Import_RootNamespace> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Content Include="$(MSBuildThisFileDirectory)Mod\mod.json" /> | ||
</ItemGroup> | ||
</Project> |
13 changes: 13 additions & 0 deletions
13
Distance.ResearchAndDevelopment.Content/Distance.ResearchAndDevelopment.Content.shproj
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>f6c2c5dd-2f7c-4423-a3bd-d54f3fa8e6c9</ProjectGuid> | ||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
<PropertyGroup /> | ||
<Import Project="Distance.ResearchAndDevelopment.Content.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"FriendlyName": "Research and Development", | ||
"Description": "Testing grounds for potential GSL features.", | ||
"Author": "Reherc", | ||
"Contact": "Github: @REHERC", | ||
"ModuleFileName": "Distance.ResearchAndDevelopment.dll", | ||
"Priority": 10, | ||
"SkipLoad": false, | ||
"Dependencies": [], | ||
"RequiredGSLs": [ | ||
"com.github.reherc/Centrifuge.Distance" | ||
] | ||
} |
141 changes: 141 additions & 0 deletions
141
Distance.ResearchAndDevelopment/Distance.ResearchAndDevelopment.csproj
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,141 @@ | ||
<?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')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{004F8E95-36D7-400D-873F-60288E533802}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Distance.ResearchAndDevelopment</RootNamespace> | ||
<AssemblyName>Distance.ResearchAndDevelopment</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\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony, Version=2.4.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\HarmonyX.2.4.0\lib\net35\0Harmony.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp, Version=9.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\Centrifuge.Distance\Centrifuge.GameSupport.Distance.Shared\Binaries\Distance\Assembly-CSharp.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mono.Cecil, Version=0.10.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Mono.Cecil.0.10.4\lib\net35\Mono.Cecil.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mono.Cecil.Mdb, Version=0.10.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Mono.Cecil.0.10.4\lib\net35\Mono.Cecil.Mdb.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mono.Cecil.Pdb, Version=0.10.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Mono.Cecil.0.10.4\lib\net35\Mono.Cecil.Pdb.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mono.Cecil.Rocks, Version=0.10.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Mono.Cecil.0.10.4\lib\net35\Mono.Cecil.Rocks.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MonoMod.RuntimeDetour, Version=21.3.1.1, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MonoMod.RuntimeDetour.21.3.1.1\lib\net35\MonoMod.RuntimeDetour.dll</HintPath> | ||
</Reference> | ||
<Reference Include="MonoMod.Utils, Version=21.3.1.1, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MonoMod.Utils.21.3.1.1\lib\net35\MonoMod.Utils.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Reactor.API, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Centrifuge.Mod.SDK.3.2.0\lib\net35\Reactor.API.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\Centrifuge.Distance\Centrifuge.GameSupport.Distance.Shared\Binaries\UnityEngine\UnityEngine.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Entry.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Centrifuge.Distance\Centrifuge.GameSupport.Distance\Centrifuge.Distance.csproj"> | ||
<Project>{c0573b40-fe3f-4e65-bb05-cc143a10a700}</Project> | ||
<Name>Centrifuge.Distance</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>SET MODNAME=Distance Research And Development | ||
SET INCLUDE=$(SolutionDir)Distance.ResearchAndDevelopment.Content | ||
|
||
SET BUILD=$(ProjectDir)$(OutDir) | ||
SET PACKAGES=$(SolutionDir)Build\%25MODNAME%25\Centrifuge | ||
|
||
SET MOD=%25PACKAGES%25\Mods\%25MODNAME%25 | ||
|
||
REM ===== COPY MOD FILES ===== | ||
|
||
CALL :MAKEDIR "%25MOD%25" | ||
|
||
CALL :COPYDIR "%25INCLUDE%25\Mod" "%25MOD%25" | ||
CALL :COPY "%25BUILD%25Distance.ResearchAndDevelopment.dll" "%25MOD%25" | ||
|
||
CALL :INCLUDEGSL Centrifuge.Distance | ||
|
||
EXIT 0 | ||
|
||
REM ===== BUILD SUBROUTINES ===== | ||
|
||
:MAKEDIR | ||
IF NOT EXIST %251 MKDIR %251 | ||
GOTO :EOF | ||
|
||
:COPY | ||
XCOPY /s /Y /v %251 %252 | ||
GOTO :EOF | ||
|
||
:COPYDIR | ||
XCOPY /i /s /Y /v %251 %252 | ||
GOTO :EOF | ||
|
||
:INCLUDEGSL | ||
CALL :MAKEDIR "%25PACKAGES%25\GameSupport" | ||
CALL :COPY "%25BUILD%25%251.dll" "%25PACKAGES%25\GameSupport" | ||
GOTO :EOF | ||
|
||
:INCLUDEDEPENDENCY | ||
CALL :MAKEDIR "%25MOD%25\Dependencies" | ||
CALL :COPY "%25BUILD%25%251.dll" "%25MOD%25\Dependencies" | ||
GOTO :EOF | ||
|
||
:INCLUDEDEPENDENCYRENAME | ||
CALL :MAKEDIR "%25MOD%25\Dependencies" | ||
CALL :COPY "%25BUILD%25%251.dll" "%25MOD%25\Dependencies\%252.dll" | ||
GOTO :EOF</PostBuildEvent> | ||
</PropertyGroup> | ||
</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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using Centrifuge.Distance.Game; | ||
using Events.MainMenu; | ||
using Reactor.API.Attributes; | ||
using Reactor.API.Interfaces.Systems; | ||
using Reactor.API.Logging; | ||
using Reactor.API.Runtime.Patching; | ||
using System.Collections; | ||
using UnityEngine; | ||
|
||
namespace Distance.ResearchAndDevelopment | ||
{ | ||
[ModEntryPoint("com.github.reherc/Distance.ResearchAndDevelopment")] | ||
public class Mod : MonoBehaviour | ||
{ | ||
public static Mod Instance; | ||
|
||
public IManager Manager { get; set; } | ||
|
||
public Log Logger { get; set; } | ||
|
||
public void Initialize(IManager manager) | ||
{ | ||
DontDestroyOnLoad(this); | ||
|
||
Instance = this; | ||
Manager = manager; | ||
Logger = LogManager.GetForCurrentAssembly(); | ||
|
||
RuntimePatcher.AutoPatch(); | ||
|
||
Initialized.Subscribe(OnMainMenuInitialized); | ||
} | ||
|
||
private void OnMainMenuInitialized(Initialized.Data data) | ||
{ | ||
Task.Run(MyTask); | ||
} | ||
|
||
private IEnumerator MyTask(Task.Status status) | ||
{ | ||
const int max = 500; | ||
|
||
status.SetText("Setting up..."); | ||
status.SetProgress(0, 1); | ||
|
||
yield return Task.Wait(1.5f); | ||
|
||
for (uint i = 1; i <= max; ++i) | ||
{ | ||
status.SetText($"Running task {i} of {max}..."); | ||
status.SetProgress(i, max); | ||
|
||
yield return Task.Wait(0.05f); | ||
} | ||
|
||
status.SetText("Finishing..."); | ||
status.SetProgress(1, 1); | ||
|
||
yield return Task.Wait(2.0f); | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Distance.ResearchAndDevelopment/Properties/AssemblyInfo.cs
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,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Distance.ResearchAndDevelopment")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Distance.ResearchAndDevelopment")] | ||
[assembly: AssemblyCopyright("Copyright © 2021")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("004f8e95-36d7-400d-873f-60288e533802")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Centrifuge.Mod.SDK" version="3.2.0" targetFramework="net35" /> | ||
<package id="HarmonyX" version="2.4.0" targetFramework="net35" /> | ||
<package id="Json.Net.Unity3D" version="9.0.1" targetFramework="net35" /> | ||
<package id="Mono.Cecil" version="0.10.4" targetFramework="net35" /> | ||
<package id="MonoMod.RuntimeDetour" version="21.3.1.1" targetFramework="net35" /> | ||
<package id="MonoMod.Utils" version="21.3.1.1" targetFramework="net35" /> | ||
</packages> |