Skip to content

Commit

Permalink
Merge pull request #88 from SpaceWarpDev/unstable-testing
Browse files Browse the repository at this point in the history
Pull unstable into main for 0.3.0 release
  • Loading branch information
cheese3660 authored Mar 1, 2023
2 parents 54d04f2 + 633fdb9 commit b73d1ca
Show file tree
Hide file tree
Showing 57 changed files with 2,301 additions and 1,968 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,4 @@ MigrationBackup/
build/

# Idea folder
.idea
.idea
Binary file modified Bundles/swconsoleui.bundle
Binary file not shown.
17 changes: 8 additions & 9 deletions ExampleMod/Class1.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using SpaceWarp.API;
using SpaceWarp.API.Mods;

namespace ExampleMod
namespace ExampleMod;

[MainMod]
public class ExampleModRunner : Mod
{
[MainMod]
public class ExampleModRunner : Mod
public override void Initialize()
{
public override void Initialize()
{
base.Initialize();
base.Initialize();

Logger.Info("Mod is initialized");
}
Logger.Info("Mod is initialized");
}
}
67 changes: 12 additions & 55 deletions ExampleMod/ExampleMod.csproj
Original file line number Diff line number Diff line change
@@ -1,62 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" 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>{F9A01E83-FA9A-4921-BF31-DB0770A8EA54}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExampleMod</RootNamespace>
<AssemblyName>ExampleMod</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\external_dlls\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SpaceWarp\SpaceWarp.csproj">
<Project>{42fa2f7b-a595-44e8-8cd5-a9c30b80a667}</Project>
<Name>SpaceWarp</Name>
</ProjectReference>
<ProjectReference Include="..\SpaceWarp\SpaceWarp.csproj" />
<PackageReference Include="UnityEngine.Modules" Version="2020.3.33" />
<Reference Include="Assembly-CSharp">
<HintPath>..\external_dlls\Assembly-CSharp.dll</HintPath>
<Publicize>true</Publicize>
</Reference>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.0" PrivateAssets="all" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

</Project>
35 changes: 0 additions & 35 deletions ExampleMod/Properties/AssemblyInfo.cs

This file was deleted.

9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Note: Use at your own risk, as this is an early version that is expected to unde
To compile this project, you will need to follow these steps:

1. Install NuGet
2. Copy everything in the `Kerbal Space Program 2\KSP2_x64_Data\Managed` folder into the `external_dlls/` folder.
3. Run one of the build scripts (see below for more info) and copy the contents from the correct build output directory into the KSP2 root directory.
4. Launch KSP2 and wait until the title screen appears. You should see a mods folder under the `SpaceWarp` folder.
5. Drag any mods that follow the structure below into that mods folder.
2. Run `nuget restore` inside the top directory to install the packages.
3. Copy everything in the `Kerbal Space Program 2\KSP2_x64_Data\Managed` folder into the `external_dlls/` folder.
4. Run one of the build scripts (see below for more info) and copy the contents from the correct build output directory into the KSP2 root directory.
5. Launch KSP2 and wait until the title screen appears. You should see a mods folder under the `SpaceWarp` folder.
6. Drag any mods that follow the structure below into that mods folder.

Mods are currently implemented as monobehaviours with two fields: a `Logger` for logging and a `Manager` that points to Spacewarp. A mod template generator exists as a Python script.

Expand Down
6 changes: 6 additions & 0 deletions ksp2_mod_loader_patcher.sln → SpaceWarp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceWarp", "SpaceWarp\SpaceWarp.csproj", "{42FA2F7B-A595-44E8-8CD5-A9C30B80A667}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleMod", "ExampleMod\ExampleMod.csproj", "{56255DE9-749D-447D-B1D8-1B634535A087}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{42FA2F7B-A595-44E8-8CD5-A9C30B80A667}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42FA2F7B-A595-44E8-8CD5-A9C30B80A667}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42FA2F7B-A595-44E8-8CD5-A9C30B80A667}.Release|Any CPU.Build.0 = Release|Any CPU
{56255DE9-749D-447D-B1D8-1B634535A087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56255DE9-749D-447D-B1D8-1B634535A087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56255DE9-749D-447D-B1D8-1B634535A087}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56255DE9-749D-447D-B1D8-1B634535A087}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit b73d1ca

Please sign in to comment.