Skip to content

Commit 71a6887

Browse files
authored
Merge pull request #34 from Falki-git/dev
v1.8.0 New entries, fixes, refactor
2 parents 8332eb4 + c07a585 commit 71a6887

File tree

255 files changed

+15667
-8256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+15667
-8256
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
16+
- name: Build the solution
17+
run: dotnet build "MicroEngineer.sln" -c Release
18+
19+
- name: Find zip
20+
id: find-zip
21+
run: |
22+
echo "zip=$(ls -1 dist/MicroEngineer-*.zip | head -n 1)" >> $GITHUB_ENV
23+
echo "artifact_name=MicroEngineerRelease" >> $GITHUB_ENV
24+
25+
- name: Upload zip artifact
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: ${{ env.artifact_name }}
29+
path: ${{ env.zip }}
30+

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Upload release
2+
3+
env:
4+
SPACEDOCK_MOD_ID: fill_in_your_mod_id_here
5+
6+
on:
7+
release:
8+
types: [ "published" ]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions: write-all
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
lfs: true
19+
20+
- name: Download NuGet
21+
id: download-nuget
22+
run: sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
23+
24+
- name: Install jq
25+
uses: dcarbone/[email protected]
26+
27+
- name: Build the solution
28+
run: dotnet build "MicroEngineer.sln" -c Release
29+
30+
- name: Extract current version
31+
id: get-version
32+
run: |
33+
version=$(jq -r '.version' plugin_template/swinfo.json)
34+
echo "Version is $version"
35+
echo "version=$version" >> $GITHUB_ENV
36+
echo "release_filename=MicroEngineer-$version.zip" >> $GITHUB_ENV
37+
echo "zip=$(ls -1 dist/MicroEngineer-*.zip | head -n 1)" >> $GITHUB_ENV
38+
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
39+
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md
40+
41+
- name: Upload zip to release
42+
uses: shogo82148/[email protected]
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
upload_url: ${{ env.upload_url }}
47+
asset_path: ${{ env.zip }}
48+
asset_name: ${{ env.release_filename }}
49+
asset_content_type: application/zip
50+
51+
# - name: Add Mask
52+
# run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"
53+
#
54+
# - name: Update mod on SpaceDock
55+
# uses: KSP2Community/[email protected]
56+
# with:
57+
# username: ${{ secrets.SPACEDOCK_USER }}
58+
# password: ${{ secrets.SPACEDOCK_PASSWORD }}
59+
# game_id: 22407
60+
# mod_id: ${{ env.SPACEDOCK_MOD_ID }}
61+
# version: ${{ env.version }}
62+
# zipball: ${{ env.zip }}
63+
# changelog: ./changelog.md

.github/workflows/verify.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Verify swinfo.json
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
verify:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Verify KSP2 Mod
16+
uses: Rexicon226/[email protected]

.gitignore

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
*.rsuser
1+
# General C# project
22
*.suo
33
*.user
4-
*.userosscache
5-
*.sln.docstates
6-
*.userprefs
7-
mono_crash.*
8-
[Dd]ebug/
9-
[Dd]ebugPublic/
10-
[Rr]elease/
11-
[Rr]eleases/
12-
x64/
13-
x86/
14-
[Aa][Rr][Mm]/
15-
[Aa][Rr][Mm]64/
16-
bld/
17-
MicroEngineerProject/[Bb]in/
4+
.vs/
5+
[Bb]in/
186
[Oo]bj/
19-
[Ll]og/
20-
[Ll]ogs/
21-
/MicroEngineerProject/.vs
22-
/MicroEngineerProject/.vs/*
23-
/Staging/CopyStagingToGame.bat
24-
*.bat
7+
_UpgradeReport_Files/
8+
/[Pp]ackages/
9+
10+
# Mod template folders
11+
/[Bb]uild/
12+
/[Dd]ist/
13+
/[Nn]uget/
14+
15+
# Rider
16+
17+
# User specific
18+
**/.idea/**/workspace.xml
19+
**/.idea/**/tasks.xml
20+
**/.idea/shelf/*
21+
**/.idea/dictionaries
22+
**/.idea/httpRequests/
23+
24+
# Sensitive or high-churn files
25+
**/.idea/**/dataSources/
26+
**/.idea/**/dataSources.ids
27+
**/.idea/**/dataSources.xml
28+
**/.idea/**/dataSources.local.xml
29+
**/.idea/**/sqlDataSources.xml
30+
**/.idea/**/dynamic.xml
31+
32+
# Rider auto-generates .iml files, and contentModel.xml
33+
**/.idea/**/*.iml
34+
**/.idea/**/contentModel.xml
35+
**/.idea/**/modules.xml
36+
37+
# VS Code files
38+
.vscode/*
39+
!.vscode/settings.json
40+
!.vscode/tasks.json
41+
!.vscode/launch.json
42+
!.vscode/extensions.json
43+
*.code-workspace
44+
45+
# Local History for Visual Studio Code
46+
.history/
47+
48+
# OS-specific
49+
Thumbs.db
50+
Desktop.ini
51+
.DS_Store

MicroEngineerProject/.idea/.idea.MicroEngineer/.idea/.gitignore renamed to .idea/.idea.MicroEngineer/.idea/.gitignore

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MicroEngineerProject/.idea/.idea.MicroEngineer/.idea/encodings.xml renamed to .idea/.idea.MicroEngineer/.idea/encodings.xml

File renamed without changes.

MicroEngineerProject/.idea/.idea.MicroEngineer/.idea/indexLayout.xml renamed to .idea/.idea.MicroEngineer/.idea/indexLayout.xml

File renamed without changes.

MicroEngineerProject/.idea/.idea.MicroEngineer/.idea/vcs.xml renamed to .idea/.idea.MicroEngineer/.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Directory.Build.props

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup Label="Framework and language configuration">
4+
<TargetFramework>netstandard2.1</TargetFramework>
5+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
6+
<LangVersion>latest</LangVersion>
7+
<ImplicitUsings>true</ImplicitUsings>
8+
</PropertyGroup>
9+
10+
<PropertyGroup Label="Game folder configuration">
11+
<!-- Set this to the path to your KSP 2 folder if you don't have the KSP2DIR environmental variable set -->
12+
<KSP2DIR Condition="'$(KSP2DIR)' == ''">C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program 2</KSP2DIR>
13+
</PropertyGroup>
14+
15+
<PropertyGroup Label="Build and namespace configuration">
16+
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
17+
<PluginBinPath>$(SolutionDir)build/bin/plugin/$(Configuration)</PluginBinPath>
18+
<PluginObjPath>$(SolutionDir)build/obj/plugin/$(Configuration)</PluginObjPath>
19+
<BaseOutputPath>$(PluginBinPath)/$(MSBuildProjectName)</BaseOutputPath>
20+
<BaseIntermediateOutputPath>$(PluginObjPath)/$(MSBuildProjectName)</BaseIntermediateOutputPath>
21+
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
22+
<RootNamespace>$(AssemblyName)</RootNamespace>
23+
<Configurations>Debug;Release;Deploy;DeployAndRun</Configurations>
24+
<Platforms>AnyCPU</Platforms>
25+
<NoWarn>$(NoWarn);CS0436</NoWarn>
26+
</PropertyGroup>
27+
28+
<PropertyGroup Label="Package source configuration">
29+
<RestoreAdditionalProjectSources>
30+
https://nuget.spacewarp.org/v3/index.json
31+
</RestoreAdditionalProjectSources>
32+
</PropertyGroup>
33+
34+
<ItemGroup Label="Dependencies for build targets">
35+
<PackageReference Include="JsonPeek" Version="1.2.0" PrivateAssets="all"/>
36+
</ItemGroup>
37+
38+
<!-- Define the main target -->
39+
<Target Label="Reading properties from swinfo.json" Name="ReadPropertiesFromJson" BeforeTargets="PreBuildEvent;AddGeneratedFile">
40+
<JsonPeek ContentPath="$(SolutionDir)/plugin_template/swinfo.json" Query="$">
41+
<Output TaskParameter="Result" ItemName="Swinfo"/>
42+
</JsonPeek>
43+
44+
<!-- Extract properties from the JSON -->
45+
<PropertyGroup>
46+
<ModId>@(Swinfo -> '%(mod_id)')</ModId>
47+
<Version>@(Swinfo -> '%(version)')</Version>
48+
<Version Condition="$(Version.Contains('-'))">$(Version.Substring(0, $(Version.IndexOf('-'))))</Version>
49+
<Product>@(Swinfo -> '%(name)')</Product>
50+
<Authors>@(Swinfo -> '%(author)')</Authors>
51+
<Description>@(Swinfo -> '%(description)')</Description>
52+
<RepositoryType>git</RepositoryType>
53+
<RepositoryUrl>@(Swinfo -> '%(source)')</RepositoryUrl>
54+
<SpaceWarpPluginGuid>$(ModId)</SpaceWarpPluginGuid>
55+
<SpaceWarpPluginName>$(Product)</SpaceWarpPluginName>
56+
<SpaceWarpPluginVersion>$(Version)</SpaceWarpPluginVersion>
57+
</PropertyGroup>
58+
</Target>
59+
</Project>
60+

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Micrologist, Falki-git
3+
Copyright (c) 2024 Falki-git
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

0 commit comments

Comments
 (0)