Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
fe7f0dc
Deleted Debug release
Mar 27, 2023
74ce005
Delete external_dlls directory
schlosrat Mar 28, 2023
9a12af0
Added MJ alglib code
Mar 28, 2023
b2a14aa
Added MJ BrentRoot solver
Mar 28, 2023
2c67303
Added MJ Gooding solver
Mar 28, 2023
6f7485f
Added MJ OrbitExtensions code
Mar 28, 2023
6ee524a
Added MJ OrbitalManeuverCalculator code
Mar 28, 2023
dc45500
Added MJ Shepperd solver
Mar 28, 2023
cc1ffd7
Removed MJ VesselState code. Not ready to integrate that yet.
Mar 28, 2023
35d7586
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
Mar 28, 2023
ae6a062
Added a bunch of files adapted from MechJeb2
schlosrat Mar 28, 2023
51f97eb
Updates to old KSP1 coding
Mar 28, 2023
944b5c1
Added alglib from MJ2
schlosrat Mar 28, 2023
3309613
Fixed
Mar 28, 2023
041cc88
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
Mar 28, 2023
a6e3e53
Updated gitignore
Mar 29, 2023
ab1e31a
Updated Load and Save methods to use PulginConfigNode instead of Conf…
Mar 29, 2023
156e127
Updated package version to 0.7.2
Apr 2, 2023
78b5214
Updated version to 0.7.2
Apr 2, 2023
bba7aac
Added capability to automatically disable game input when the user ha…
Apr 2, 2023
0f85b8c
Commented out unnecessary using statements
Apr 2, 2023
7c08370
Updated version to 0.7.3
Apr 2, 2023
d94eee6
Added capability to display the Delta-v remaining during a burn. This…
Apr 2, 2023
e0ab754
Removed unused MJ code
Apr 3, 2023
05cbfa0
Commented out unused Log method to eliminate dependecy on MJ Logger
Apr 3, 2023
fd1c715
Cleaned up code to help track down and eliminate NREs showing up in K…
Apr 3, 2023
a079bca
Updated to version 0.7.4
Apr 3, 2023
f72ae26
Updated to Package Version 0.7.4 to align with mod version
Apr 3, 2023
0cda578
Removed dead code
Apr 3, 2023
d2b7001
Cleaned up CreateManeuverNode and AddManeuverNode (not used currently…
Apr 3, 2023
0b33915
Fixed AddManeuverNode to use corrent new name for variable nodeData
Apr 3, 2023
e51addd
Updated for version 0.7.5
Apr 5, 2023
96938bc
Updated handling of node creation
Apr 5, 2023
7b64c6c
Cleaned up sources of exceptions! Cleaned up node creation.
Apr 5, 2023
c11fe93
Updated logging so that it will all go to BepInEx log
Apr 5, 2023
c0b9cd7
Updated for v 0.7.6. Now disabling MNC GUI in the VAB and KSC views. …
Apr 6, 2023
52fd82f
Updated for version 0.8.0
Apr 7, 2023
cbb62ab
Cleaned up and compressed the GUI. Added section to show current and …
Apr 7, 2023
7c4adba
Final 0.8.0 GUI Clean Up
Apr 7, 2023
0f40d2f
Update README.md
schlosrat Apr 7, 2023
812ce71
Removed unnecessary using statements. Commented out unecessary logging
Apr 7, 2023
7b5f3a3
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
Apr 8, 2023
c39d920
Merge pull request #8 from schlosrat/main
XYZ3211 Apr 9, 2023
2762ff6
Update README.md
XYZ3211 Apr 9, 2023
607d64c
Updated README image.
XYZ3211 Apr 9, 2023
cabe1a6
Update ManeuverNodeControllerPlugin.cs
XYZ3211 Apr 9, 2023
2dbff49
Update swinfo.json
XYZ3211 Apr 9, 2023
e5beead
Update ManeuverNodeController.csproj
XYZ3211 Apr 9, 2023
b84762e
Updated for v 0.8.1 and KSP 0.1.2
Apr 12, 2023
09e7126
Added display of maneuver node start time and burn duration. Added ch…
Apr 12, 2023
ee3a489
Added a check to the call to get gameState in OnGUI to help prevent N…
Apr 12, 2023
24e8e19
Updated for version 0.8.2
Apr 12, 2023
7c4c584
Fixed call to set gameState in OnGUI to prevent spamming the log with…
Apr 12, 2023
5def924
Merge branch 'main' into main
XYZ3211 Apr 14, 2023
472b245
0.8.1
schlosrat Apr 14, 2023
5aaf0a8
Update source URL
XYZ3211 Apr 14, 2023
5449038
Update ManeuverNodeControllerPlugin.cs
XYZ3211 Apr 14, 2023
41d09a5
Added commands to the post build events to copy files to my KSP2 Debu…
Apr 14, 2023
a7c754f
Minor changes to make accessing the activeVessel's Orbit a bit easier
Apr 14, 2023
e6da1c8
Updated project for post build event to automatically copy files to m…
Apr 14, 2023
094e999
Updated csproj to reference https://nuget.spacewarp.org/v3/index.json…
Apr 15, 2023
f91fb70
Removed unneded MJ code placing only the minimally needed functions i…
Apr 16, 2023
13c616d
Updated post-build event actions to copy the dll to Flight Plan's ext…
Apr 16, 2023
af940dc
Reverted plugin GUID to com.github.xyz3211.maneuver_node_controller a…
Apr 16, 2023
69a7357
Updated version to 0.8.3
Apr 16, 2023
fa9cc38
Added feature to highlight text entry fields in red when the content …
Apr 16, 2023
b8b4fb6
Changed the names of some things to prevent conflics in Flight Plan
Apr 16, 2023
c557c17
Changed the names of some things in simple_mj to prevent conflicts wi…
Apr 16, 2023
34f53f2
Changed Instance from private to public to support external API
Apr 16, 2023
66211b6
Added public constants for ModGuide, ModName, and ModVer to the base …
Apr 16, 2023
72774a4
Removed unneded using statement
Apr 17, 2023
467b694
Carved out all the node control functions and put them in their own …
Apr 17, 2023
4f506be
Hijacked and adapted Utility and Styles from Micro Engineer
Apr 17, 2023
9238257
Added version_check
Apr 17, 2023
54e5f77
Fixed version_check
Apr 17, 2023
a4300c4
Updated some comments
Apr 17, 2023
8d26a24
Updated to use functions from Utiltiy
Apr 17, 2023
6d2b524
Updated to use Utilty.activeVessel and Utiltiy.currentNode
Apr 17, 2023
392036d
Removed unnecessary using statements
Apr 17, 2023
17ccbc6
Updated NodeControl Nodes list to be public so the main class can see…
Apr 17, 2023
12b1c8c
Changed all the instances of Utility.currentNode to be the local vari…
Apr 17, 2023
0e9f394
Fixed display of Previous and Next Orbital info so that it correctly …
Apr 17, 2023
40a3dfb
Playing with a different way to create nodes
Apr 17, 2023
5e96113
Multi-Node capability fixed!
Apr 17, 2023
5c16916
Updated for version 0.9.0
Apr 17, 2023
ba9f050
Removed Styles.cs - not needed
Apr 18, 2023
c26a0e6
Removed commented out dead code. Commented out some (like) unneeded m…
Apr 18, 2023
9f42df8
Updated Delete Nodes to incorporate improvements from ME. Removed som…
Apr 18, 2023
eec4236
Updated GUI to use the SecondsToTimeString method from Utility.cs. Mi…
Apr 18, 2023
014cedb
Updated SecondsToTimeString to be 00d 00:00:00.00 format.
Apr 18, 2023
5b5454f
Updated RefreshManeuverNodes to return the count of nodes found as a …
Apr 18, 2023
ce8e50d
Removed unneded using statements. Updated definition for errorStyle a…
Apr 18, 2023
71aa734
Trimmed up UpdateNode so that all it does it put a gizmo on the node.…
Apr 18, 2023
2a2517f
Simplified the SelectedNodeIndex/thisNode setting logic in OnGUI. Sim…
Apr 18, 2023
4240b16
Updated for v 0.9.1
Apr 18, 2023
ca4bcb0
Commented out most of OnManeuverRemovedMessage as that's now handled …
Apr 18, 2023
be84d75
Merge branch 'main' into main
XYZ3211 Apr 19, 2023
5e9b4a9
0.8.3 (#10)
schlosrat Apr 19, 2023
16b3077
Update swinfo.json
XYZ3211 Apr 19, 2023
76502b8
Reinstated old build script
XYZ3211 Apr 19, 2023
aaa9268
Changed AddManeuverNode from calling AddNodeToVessel to calling AddNode.
Apr 19, 2023
74afbc5
Moved code that checks and sets SelectedNodeIndex and thisNode from O…
Apr 19, 2023
df6f6e6
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
Apr 19, 2023
4c090f8
Fixed bug preventing Add Node from working when there are no existing…
Apr 19, 2023
6d1b34a
Modified node display to show N of M in top line
Apr 20, 2023
0c91c40
Refactored NodeControl and Utilty to be specific to this mod
Apr 20, 2023
b1fd050
Fixed post build event to allso copy the swinfo.json file to the game…
Apr 20, 2023
1c6badc
Refactored NodeControl and Utility to be named specifically for this mod
Apr 20, 2023
8b12a65
Fixed subscriptiont to ManeuverCreatedMessage
Apr 21, 2023
6cbc227
Fixed BepInPlugin attribute to use MyPluginInfo.PLUGIN_GUID, MyPlugin…
Apr 21, 2023
8348f87
Fixed but in handling of deleted nodes
Apr 21, 2023
c3603df
Updated for v 0.9.2. Added Node Manager hard dependecy
Apr 22, 2023
11eea03
Debug build now allows for Check Node function and Make Node function…
Apr 22, 2023
71887e2
Fixed functions to work even if we're using Node Manager. Added calls…
Apr 22, 2023
20a1708
Updated to capture the boolean returned by NodeManager node creation …
Apr 22, 2023
9f1715a
Removed old csproj. New one is located in ManeuverNodeControllerProje…
Apr 22, 2023
33145c0
Removed MNCNodeControler as that functionality is now obtained from N…
Apr 22, 2023
b0c06c3
Updated for dependency on Node Manager 0.5.3
Apr 22, 2023
c687c0d
Removed dependence on MNCNodeControls. Removed addNode2 button. Updat…
Apr 22, 2023
f4f2162
Removed dead code
Apr 22, 2023
d140214
Removed hard link to local nuget
Apr 22, 2023
835801d
Set version to 0.9.1
Apr 22, 2023
d9fb488
Update README.md
schlosrat Apr 22, 2023
130a873
Update README.md
schlosrat Apr 22, 2023
7a8d58d
Reduced diagnostic logging
Apr 24, 2023
6d02afa
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
Apr 24, 2023
7c3a41f
Added icon options
Apr 30, 2023
7d9cb06
Added K2D2 batch scripts for easier building
May 1, 2023
045ab3b
Added K2D2 style GUI support
May 1, 2023
165d690
Added K2D2 style GUI assets
May 1, 2023
9a79dce
Added K2D2 style post build events (uses new batch scripts)
May 1, 2023
962ab95
Removed unneded self-references
May 1, 2023
c26d48b
Added MNCSettings to support K2D2 style settings control
May 1, 2023
8854466
Cleaned up usings statements, adding new ones needed for Harmony and …
May 1, 2023
93ea63c
Moved MNC styles into MNCStyles
May 1, 2023
3a1619b
UpdatedDoubleField to use MNCStyes.text_input
May 1, 2023
4a49d21
no change
May 1, 2023
638f4f9
Updated to use MNCStyles. Made Previous/Next Orbit info line up. Comp…
May 1, 2023
1088f69
Removed dead code
May 1, 2023
03862f0
Moved the last of the GUI styles stuff in
May 1, 2023
60a624a
Removed the last of the GUI style stuff and some dead code
May 1, 2023
1417e6a
no change
May 1, 2023
e2ee9f8
Updated for 0.9.2
May 1, 2023
c30e1e9
Added Images folder
May 1, 2023
1f4a1fc
Added banner images
May 1, 2023
dfff145
Moved settings into MNCSettings
May 1, 2023
3eb91b1
Update README.md
schlosrat May 1, 2023
51f0136
Fixed buttons
May 2, 2023
97557f9
Merge branch 'main' into main
XYZ3211 May 3, 2023
2b40404
Update README.md
schlosrat May 4, 2023
7834900
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
schlosrat May 4, 2023
44e25ff
Revert accidental push
schlosrat May 4, 2023
ee6ce01
Removed errant }
schlosrat May 4, 2023
0ea1219
Shortened the seoncds output to fit longer strings on the GUI
schlosrat May 17, 2023
ae3d0ea
Fixed issue where the wrong next orbit info was displayed if a patch …
schlosrat May 17, 2023
155c452
Added a schlosrat version of swinfo to point at my repo for validatio…
schlosrat May 17, 2023
93e824b
Updated for version 0.9.3
schlosrat May 17, 2023
50ad558
Updated banner images to show new GUI look
schlosrat May 20, 2023
b52f468
Update swinfo.json
schlosrat May 21, 2023
0739d27
Fixed version_check URL
schlosrat May 21, 2023
24dd7bf
Changed source location to point at schlosrat copy. Can change back o…
schlosrat May 21, 2023
50ba646
Aligned methods in simple_mj with the latest versions from Flight Pla…
schlosrat May 27, 2023
a485378
Changed references from ModID to GUID. Changed SpaceWarpMetadata.ModI…
schlosrat May 27, 2023
9d25327
Updated to require SW 1.2 and Node Manager 0.5.5. Removed simple_mj
schlosrat May 27, 2023
9264d97
Initial development of UITK GUI
schlosrat Jun 4, 2023
06244d0
Updated for inclusion of Unity project
schlosrat Jun 4, 2023
cc21502
Initial UITK build
schlosrat Jun 5, 2023
911a5c0
Update for UITK GUI and LSP 0.1.3
schlosrat Jun 24, 2023
10aec02
Fixed issue causing NREs one game reload with the mod open.
schlosrat Jul 5, 2023
2ca9c1b
Added check for null orbit to prevent NREs when loading a save
schlosrat Jul 5, 2023
8178b41
Updated for 0.9.6
schlosrat Jul 5, 2023
745b737
Added user configurable hot key settings. Now works with both left an…
schlosrat Jul 6, 2023
bd11d88
Restored handling for text fields
schlosrat Jul 7, 2023
aa01937
Added Fonts
schlosrat Jul 17, 2023
5a52f51
Added new rows for encoutner body and encoutner level
schlosrat Jul 17, 2023
fa1efed
Updated field names for new rows
schlosrat Jul 17, 2023
aba8099
Removed unneeded icons
schlosrat Jul 18, 2023
21ee98c
Removed unneeded fonts, rebuilt needed font
schlosrat Jul 18, 2023
66d5076
Removed old SpaceWarpUI stuff not needed in this UI
schlosrat Jul 18, 2023
fc15236
Rebuilt Unity Project with fresh copy of UITK For KSP2 1.4
schlosrat Jul 18, 2023
a9cd148
Added MetersToScaledDistanceString
schlosrat Jul 18, 2023
10db3e9
Added display of encounter info. Modified display of Ap and Pe to aut…
schlosrat Jul 18, 2023
e7c4b6c
Updated for v 0.9.7
schlosrat Jul 18, 2023
4678070
Update README.md
schlosrat Jul 18, 2023
6582be2
Added transition start and end info to next and previous encounter
schlosrat Jul 20, 2023
3f8557e
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
schlosrat Jul 20, 2023
8e0daec
Added previous and next transition start and end state info
schlosrat Jul 20, 2023
e293a5f
Upodated for v0.9.8
schlosrat Jul 20, 2023
958aba5
Updated UI to conform to new look
schlosrat Jul 20, 2023
495ef85
Added example image showing UIa
schlosrat Jul 21, 2023
9596b73
Updated MNC UI design and asset bundle
schlosrat Jul 28, 2023
b4d0760
Updated display of Post Node Event Lookahead
schlosrat Jul 28, 2023
6567d10
Added PreviousNextGroup to control display of that info block
schlosrat Jul 28, 2023
3a5818e
Added PreviousNextGroup to control the display of that info. Imptrove…
schlosrat Jul 28, 2023
63eafd2
Updated for Version 1.0.0
schlosrat Jul 28, 2023
f743c90
Add files via upload
schlosrat Jul 28, 2023
90c8097
Update README.md
schlosrat Jul 28, 2023
fab0b4b
Fixed issue causing warning on startup
schlosrat Jul 29, 2023
a89844c
Merge branch 'main' of https://github.com/schlosrat/ManeuverNodeContr…
schlosrat Jul 29, 2023
9d3275d
Added check for for null when getting the node list
schlosrat Jul 30, 2023
9a33215
Updated for Spec 1.3
schlosrat Jul 30, 2023
f0aba82
Added autoClose and autoLaunch config parameters (default false)
schlosrat Aug 14, 2023
08164e6
Added autoLaunch and autoClose config parameters (default false)
schlosrat Aug 14, 2023
77d273c
Updates to UITK gui
schlosrat Aug 14, 2023
ee495a0
Updated for v1.0.1
schlosrat Aug 14, 2023
e715c0b
Added forceOpen capability so that even when autoclose is on, if the …
schlosrat Aug 22, 2023
ab466e6
Updated for version 1.0.2
schlosrat Aug 22, 2023
ed64db1
Updated for dependencies on SpaceWarp 1.4.2, Node Manager 0.6.1, and …
schlosrat Aug 31, 2023
7a994c6
Changed every freaking instance of UniveralTime to UniverseTime to ap…
schlosrat Aug 31, 2023
81283ce
Updated for version 1.0.3
schlosrat Aug 31, 2023
39cb52b
v 1.1.0
schlosrat Oct 26, 2023
bf16b1a
Fixed asset bundle
schlosrat Oct 27, 2023
c01f606
1.1.1
schlosrat Oct 29, 2023
bb90989
Update local_dev_options.bat
schlosrat Jan 15, 2024
3c8e9eb
Updated for MNC v1.1.2 requiring NM 0.7.1, SW 1.8.1, UITK 2.4.2, etc.
schlosrat Jan 27, 2024
cf6d08c
Added increment/decriment buttons for several text inputs to facilita…
schlosrat Jan 27, 2024
93b311b
Updated project to use the latest UITK. Rebuilt all fonts. Added a ga…
schlosrat Jan 27, 2024
e46af4d
Updated for MNC v 1.1.3
schlosrat Jan 28, 2024
852ea29
Converted step application buttons to be RepeatButtons. Set delay and…
schlosrat Jan 28, 2024
a0b242d
Converted project to newest template
jan-bures Jan 28, 2024
609506f
Rename ManeuverNodeControllerPlugin to ManeuverNodeControllerMod for …
jan-bures Jan 28, 2024
1a6e438
Fixed path to UXML file
jan-bures Jan 28, 2024
ac7015a
MNC-specific project setup
jan-bures Jan 28, 2024
cdfc1d6
Delete Rider-specific files
jan-bures Jan 28, 2024
2ba616d
SpaceDock integration setup
jan-bures Jan 28, 2024
d667527
Update README.md
schlosrat Jan 29, 2024
66d6890
Corrected file names in workflows
jan-bures Jan 29, 2024
bd9686f
Updated icon import settings to Sprite
jan-bures Jan 31, 2024
1827f7a
Removed CJK fallbacks from custom fonts
jan-bures Jan 31, 2024
607f053
Added new arrow icons
jan-bures Jan 31, 2024
23db6ca
Updated Unity packages
jan-bures Jan 31, 2024
a6395ce
Updated main plugin class to use newer UITK API + some refactoring
jan-bures Jan 31, 2024
3c5f8b6
Rewritten UXML and USS
jan-bures Jan 31, 2024
a081f2a
UI controller updated for new UXML
jan-bures Jan 31, 2024
73f277e
Merge pull request #1 from jan-bures/Dev
schlosrat Jan 31, 2024
ca35607
Updated MNC UI Unity project for SnapTo button size and alignement
schlosrat Feb 2, 2024
bb9f4b2
Updated MNC UI bundle for unity project changes
schlosrat Feb 2, 2024
0227d50
Updated MNC Config image for new features and new SW look
schlosrat Feb 2, 2024
13cff4a
Merge branch 'main' into Dev
schlosrat Feb 2, 2024
40e7fed
Updated mnc documentation images
schlosrat Feb 3, 2024
47bae91
Merge branch 'Dev' of https://github.com/schlosrat/ManeuverNodeContro…
schlosrat Feb 3, 2024
8ada1ce
Added 'Check version' and 'Update mod topic' actions
schlosrat Feb 3, 2024
0ee526e
no change
schlosrat Feb 16, 2024
6fb2344
Added MOD_DISCORD_THREAD_ID. Removed "v" in version check. Added post…
schlosrat Feb 16, 2024
48607c2
Added stand-alone versions for discord and forum updates
schlosrat Feb 16, 2024
4e4e92f
Made interfaceEnabled and GUIenabled both public for use in MncUiCont…
schlosrat Feb 16, 2024
cf5c5fe
Added check in Update() to ensure ManeuverNodeControllerMod.Instance.…
schlosrat Feb 16, 2024
4a0be8d
Added check to ensure hot key is not responded to while the UI is dis…
schlosrat Mar 9, 2024
6b3f57a
Updated for version 1.2.1
schlosrat Mar 9, 2024
9c770f3
Update for KSP 0.2.2
schlosrat Jun 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Build the solution
run: dotnet build "ManeuverNodeController.sln" -c Release

- name: Find zip
id: find-zip
run: |
echo "zip=$(ls -1 dist/ManeuverNodeController-*.zip | head -n 1)" >> $GITHUB_ENV
echo "artifact_name=ManeuverNodeControllerRelease" >> $GITHUB_ENV

- name: Upload zip artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: ${{ env.zip }}
49 changes: 49 additions & 0 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Discord Topic

env:
MOD_DISCORD_THREAD_ID: "1201143347004317757" # It should be quoted to prevent YAML from interpreting it as an integer

on:
workflow_dispatch:

jobs:
post_to_discord:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Install jq
uses: dcarbone/install-jq-action@v2.1.0

- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md

- name: Prepare content
shell: bash
run: |
echo -e "## Release ${version}\n" > ./content.md
cat ./changelog.md >> ./content.md
{
echo 'discord_message<<EOF'
cat ./content.md
echo EOF
} >> "$GITHUB_ENV"

- name: Update mod topic
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_KMS_WEBHOOK_URL }}
content: ${{ env.discord_message }}
thread-id: ${{ env.MOD_DISCORD_THREAD_ID }}
username: "Maneuver Node Controller"
avatar-url: "https://avatars.githubusercontent.com/u/50781429?s=120&v=4"

60 changes: 60 additions & 0 deletions .github/workflows/forum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Update forum topic

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Install jq
uses: dcarbone/install-jq-action@v2.1.0

- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md

# - name: Upload zip to release
# uses: shogo82148/actions-upload-release-asset@v1.7.2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ env.upload_url }}
# asset_path: ${{ env.zip }}
# asset_name: ${{ env.release_filename }}
# asset_content_type: application/zip

# - name: Add Mask
# run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"
#
# - name: Update mod on SpaceDock
# uses: KSP2Community/spacedock-upload@v1.0.0
# with:
# username: ${{ secrets.SPACEDOCK_USER }}
# password: ${{ secrets.SPACEDOCK_PASSWORD }}
# game_id: 22407
# mod_id: ${{ env.SPACEDOCK_MOD_ID }}
# version: ${{ env.version }}
# zipball: ${{ env.zip }}
# changelog: ./changelog.md

- name: Update mod topic
uses: Kerbalight/ksp2-forum-post-action@latest
with:
username: ${{ secrets.KSP_FORUM_USERNAME }}
password: ${{ secrets.KSP_FORUM_PASSWORD }}
forum_topic_url: https://forum.kerbalspaceprogram.com/topic/214244-maneuver-node-controller-080/
forum_topic_title: "Maneuver Node Controller [{version} for KSP2 v{ksp2_version}]"
spacedock_url: "https://spacedock.info/mod/3359/Flight%20Plan#changelog"
version: ${{ env.version }}
changelog: ./changelog.md
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Upload release

env:
SPACEDOCK_MOD_ID: 3270 # Maneuver Node Controller
MOD_DISCORD_THREAD_ID: "1201143347004317757" # It should be quoted to prevent YAML from interpreting it as an integer

on:
release:
types: [ "published" ]

jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

- name: Download NuGet
id: download-nuget
run: sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

- name: Install jq
uses: dcarbone/install-jq-action@v2.1.0

- name: Check version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Tag is ${{ github.ref_name }}"
if [[ "${{ github.ref_name }}" != "$version" ]];
then
echo "Invalid version tag: ${{ github.ref_name }}. Expected $version."
exit 1
fi

- name: Build the solution
run: dotnet build "ManeuverNodeController.sln" -c Release

- name: Extract current version
id: get-version
run: |
version=$(jq -r '.version' plugin_template/swinfo.json)
echo "Version is $version"
echo "version=$version" >> $GITHUB_ENV
echo "release_filename=ManeuverNodeController-$version.zip" >> $GITHUB_ENV
echo "zip=$(ls -1 dist/ManeuverNodeController-*.zip | head -n 1)" >> $GITHUB_ENV
echo "upload_url=$(wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq '.[0].upload_url' | tr -d \")" >> $GITHUB_ENV
wget -qO- https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[0].body' > ./changelog.md

- name: Upload zip to release
uses: shogo82148/actions-upload-release-asset@v1.7.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.upload_url }}
asset_path: ${{ env.zip }}
asset_name: ${{ env.release_filename }}
asset_content_type: application/zip

- name: Add Mask
run: echo "::add-mask::${{ secrets.SPACEDOCK_PASSWORD }}"

- name: Update mod on SpaceDock
uses: KSP2Community/spacedock-upload@v1.0.0
with:
username: ${{ secrets.SPACEDOCK_USER }}
password: ${{ secrets.SPACEDOCK_PASSWORD }}
game_id: 22407
mod_id: ${{ env.SPACEDOCK_MOD_ID }}
version: ${{ env.version }}
zipball: ${{ env.zip }}
changelog: ./changelog.md

- name: Update mod topic
uses: Kerbalight/ksp2-forum-post-action@latest
with:
username: ${{ secrets.KSP_FORUM_USERNAME }}
password: ${{ secrets.KSP_FORUM_PASSWORD }}
post_title: "## Release {version}" # (without the v)
forum_topic_url: https://forum.kerbalspaceprogram.com/topic/214244-maneuver-node-controller-080/
forum_topic_title: "Maneuver Node Controller [{version} for KSP2 v{ksp2_version}]"
spacedock_url: "https://spacedock.info/mod/3270/Maneuver%20Node%20Controller#changelog"
version: ${{ env.version }}
changelog: ./changelog.md

- name: Prepare content
shell: bash
run: |
echo -e "## Release ${version}\n" > ./content.md
cat ./changelog.md >> ./content.md
{
echo 'discord_message<<EOF'
cat ./content.md
echo EOF
} >> "$GITHUB_ENV"

- name: Update mod topic
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_KMS_WEBHOOK_URL }}
content: ${{ env.discord_message }}
thread-id: ${{ env.MOD_DISCORD_THREAD_ID }}
username: "Maneuver Node Controller"
avatar-url: "https://avatars.githubusercontent.com/u/50781429?s=120&v=4"
16 changes: 16 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Verify swinfo.json

on:
push:
branches: [ "main" ]

jobs:
verify:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Verify KSP2 Mod
uses: Rexicon226/VerifierAction@V0.5
34 changes: 32 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
# General C# project
*.suo
*.user
.vs/
[Bb]in/
[Oo]bj/
.vs/
*.zip
_UpgradeReport_Files/
/[Pp]ackages/

# Mod template folders
/[Bb]uild/
/[Dd]ist/
/[Nn]uget/

# Rider

# User specific
**/.idea

# VS Code files
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# OS-specific
Thumbs.db
Desktop.ini
.DS_Store
1 change: 0 additions & 1 deletion Debug/BepInEx/plugins/maneuver_node_controller/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions Debug/BepInEx/plugins/maneuver_node_controller/README.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 0 additions & 22 deletions Debug/BepInEx/plugins/maneuver_node_controller/swinfo.json

This file was deleted.

Loading