diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..d2e130e
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,57 @@
+name: Build
+
+on:
+ push:
+ branches:
+ - main
+ paths-ignore:
+ - "README.md"
+ - "CHANGELOG.md"
+ - ".gitignore"
+ tags-ignore:
+ # This will ignore release versions tagged with a version identifier. We'll
+ # use a separate workflow for them.
+ - "v*"
+ pull_request:
+ paths-ignore:
+ - README.md
+ - "CHANGELOG.md"
+ - ".gitignore"
+
+jobs:
+ build:
+ name: Build
+ runs-on: windows-latest
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Setup Dotnet
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 6.0.x
+
+ - name: Build Mod for 1.5
+ env:
+ RimWorldVersion: 1.5
+ run: dotnet build .vscode --configuration Release
+
+ - name: Upload Mod Artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: RealisticOrbitalTrade-${{ github.sha }}
+ path: |
+ About/
+ 1.5/
+ Common/
+ Defs/
+ Patches/
+ LICENSE
+ LICENSE.Apache-2.0
+ LICENSE.MIT
+ README.md
+ CHANGELOG.md
+ !**/.*
+ !About/*.pdn
+ !About/*.svg
+ !About/*.ttf
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ebed9fa
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,103 @@
+name: Release
+
+on:
+ push:
+ tags:
+ # This will only run the release workflow when it's tagged with a version
+ # tag.
+ - "v*"
+
+jobs:
+ build:
+ name: Build
+ runs-on: windows-latest
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Setup Dotnet
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 6.0.x
+
+ - name: Build Mod for 1.5
+ env:
+ RimWorldVersion: 1.5
+ run: dotnet build .vscode --configuration Release
+
+ - name: Upload Mod Artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: RealisticOrbitalTrade-Release
+ path: |
+ About/
+ 1.5/
+ Common/
+ Defs/
+ Patches/
+ LICENSE
+ LICENSE.Apache-2.0
+ LICENSE.MIT
+ README.md
+ CHANGELOG.md
+ !**/.*
+ !About/*.pdn
+ !About/*.svg
+ !About/*.ttf
+
+ package:
+ name: Release
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set Environment Variables
+ run: |
+ echo "MOD_PATH=$HOME/RealisticOrbitalTrade" >> $GITHUB_ENV
+ echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
+ echo "NO_PREFIX_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
+
+ - name: Create Mod Folder
+ run: mkdir -p ${{ env.MOD_PATH }}
+
+ - name: Download Mod Artifacts from Build Step
+ uses: actions/download-artifact@v3
+ with:
+ name: RealisticOrbitalTrade-Release
+ path: ${{ env.MOD_PATH }}
+
+ - name: Zip Mod
+ run: |
+ cd $HOME
+ zip -r ./RealisticOrbitalTrade.zip ./RealisticOrbitalTrade/*
+
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+
+ - name: Get Changelog Entry
+ id: changelog_reader
+ uses: mindsers/changelog-reader-action@v2
+ with:
+ version: ${{ env.NO_PREFIX_VERSION }}
+ path: ./CHANGELOG.md
+
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ env.VERSION }}
+ release_name: Release ${{ env.VERSION }}
+ body: ${{ steps.changelog_reader.outputs.changes }}
+ draft: false
+ prerelease: false
+
+ - name: Upload Release Asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ${{ env.MOD_PATH }}.zip
+ asset_name: RealisticOrbitalTrade-${{ env.VERSION }}.zip
+ asset_content_type: application/zip
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1e2b49e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/.vscode/obj
+
+/*/Assemblies
diff --git a/.vscode/build.ps1 b/.vscode/build.ps1
new file mode 100644
index 0000000..041a76d
--- /dev/null
+++ b/.vscode/build.ps1
@@ -0,0 +1,33 @@
+$ErrorActionPreference = 'Stop'
+
+$Target = "C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\RealisticOrbitalTrade"
+
+# build dlls
+$env:RimWorldVersion = "1.5"
+dotnet build --configuration Release .vscode
+if ($LASTEXITCODE -gt 0) {
+ throw "Build failed"
+}
+
+# remove mod folder
+Remove-Item -Path $Target -Recurse -ErrorAction SilentlyContinue
+
+# copy mod files
+Copy-Item -Path 1.5 $Target\1.5 -Recurse
+
+Copy-Item -Path Common $Target\Common -Recurse
+Copy-Item -Path Defs $Target\Defs -Recurse
+Copy-Item -Path Patches $Target\Patches -Recurse
+
+New-Item -Path $Target -ItemType Directory -Name About
+Copy-Item -Path About\About.xml $Target\About
+Copy-Item -Path About\Manifest.xml $Target\About
+Copy-Item -Path About\Preview.png $Target\About
+Copy-Item -Path About\ModIcon.png $Target\About
+Copy-Item -Path About\PublishedFileId.txt $Target\About
+
+Copy-Item -Path CHANGELOG.md $Target
+Copy-Item -Path LICENSE $Target
+Copy-Item -Path LICENSE.Apache-2.0 $Target
+Copy-Item -Path LICENSE.MIT $Target
+Copy-Item -Path README.md $Target
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..1a3ff64
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,33 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Rimworld Mod Project",
+ "type": "clr",
+ "request": "launch",
+ "preLaunchTask": "build dll",
+ "args": [],
+ "program": "C:/Program Files (x86)/Steam/steamapps/common/RimWorld/RimWorldWin64.exe",
+ "cwd": "${workspaceFolder}",
+ "console": "internalConsole",
+ "internalConsoleOptions": "neverOpen",
+ "stopAtEntry": true
+ },
+ { // ignore
+ "name": ".NET Framework Attach",
+ "type": "clr",
+ "request": "attach",
+ "processId": "${command:pickProcess}",
+ "symbolOptions": {
+ "searchPaths": [
+ ".vscode/obj/Debug/*"
+ ],
+ "searchMicrosoftSymbolServer": false,
+ "searchNuGetOrgSymbolServer": false
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/mod.csproj b/.vscode/mod.csproj
new file mode 100644
index 0000000..48771d2
--- /dev/null
+++ b/.vscode/mod.csproj
@@ -0,0 +1,55 @@
+
+
+ Library
+ net472
+ x64
+ 10.0
+ enable
+
+ RealisticOrbitalTrade
+ RealisticOrbitalTrade
+ 0.1.0
+
+ false
+
+
+ 1.5
+
+
+
+ none
+ false
+ true
+
+
+
+ full
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+ $(DefineConstants);v1_5
+ ../1.5/Assemblies
+
+
+
+ runtime
+
+
+
+
+
+
+
+ runtime
+
+
+
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..23adc9f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "xml.format.maxLineWidth": 0
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..0e59931
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build dll",
+ "type": "shell",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "command": ".vscode/build.ps1",
+ "problemMatcher": []
+ }
+ ]
+}
diff --git a/About/About.xml b/About/About.xml
new file mode 100644
index 0000000..880fe8b
--- /dev/null
+++ b/About/About.xml
@@ -0,0 +1,37 @@
+
+
+ ilyvion.RealisticOrbitalTrade
+ Realistic Orbital Trade
+ ilyvion
+ Has it ever bothered you how the orbital traders can just magically teleport items right out of your stockpiles? This mod puts an end to that. With <b>Realistic Orbital Trade</b>, your pawns will now have to load up a shuttle with the goods you sold before the orbital trader gets their hands on them AND before you get your hands on the goods you bought.
+
+The mod will guide you through all the required steps using the RimWorld quest and letter systems once you've made a trade with an orbital trader.
+
+The mod can be added to a game at any time. Removing the mod should be fine as long as there is no active trading quest at the time. There will be a fairly large list of once-off errors when first loading such a save, however.
+
+Mod compatibility is probably generally good, but there might be issues with mods that modify how orbital traders work or how vanilla shuttles work.
+
+<size=24>Version</size>
+
+This is version 0.1.0 for RimWorld 1.5
+
+
+ 1.5
+
+
+
+ brrainz.harmony
+ Harmony
+ https://steamcommunity.com/workshop/filedetails/?id=2009463077
+ steam://url/CommunityFilePage/2009463077
+
+
+ Ludeon.RimWorld.Royalty
+ Royalty
+
+
+
+ brrainz.harmony
+ Ludeon.RimWorld.Royalty
+
+
diff --git a/About/LogoText.png b/About/LogoText.png
new file mode 100644
index 0000000..6310387
Binary files /dev/null and b/About/LogoText.png differ
diff --git a/About/LogoText.svg b/About/LogoText.svg
new file mode 100644
index 0000000..d03261b
--- /dev/null
+++ b/About/LogoText.svg
@@ -0,0 +1,104 @@
+
+
diff --git a/About/Manifest.xml b/About/Manifest.xml
new file mode 100644
index 0000000..ff7979d
--- /dev/null
+++ b/About/Manifest.xml
@@ -0,0 +1,12 @@
+
+
+ ilyvion.RealisticOrbitalTrade
+ 0.1.0
+
+ brrainz.harmony
+ Ludeon.RimWorld.Royalty
+
+
+ https://raw.githubusercontent.com/ilyvion/realistic-orbital-trade/main/About/Manifest.xml
+ https://github.com/ilyvion/realistic-orbital-trade/releases/latest
+
diff --git a/About/ModIcon.pdn b/About/ModIcon.pdn
new file mode 100644
index 0000000..c0112c4
--- /dev/null
+++ b/About/ModIcon.pdn
@@ -0,0 +1,248 @@
+PDN3s&