From 3e02cf8092da6caf2f7d610720265b846d7c6cc2 Mon Sep 17 00:00:00 2001 From: KlaasWhite <45828001+KlaasWhite@users.noreply.github.com> Date: Sat, 15 Nov 2025 19:47:50 +0100 Subject: [PATCH 1/2] Fix package release --- .github/workflows/release-zip.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-zip.yml b/.github/workflows/release-zip.yml index 46b6c20..f4cc563 100644 --- a/.github/workflows/release-zip.yml +++ b/.github/workflows/release-zip.yml @@ -141,5 +141,4 @@ jobs: /p:Version=${{ steps.version.outputs.new }} \ /p:AssemblyVersion=${{ steps.version.outputs.new }} \ /p:FileVersion=${{ steps.version.outputs.new }} - dotnet nuget add source --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text --name github "${{ env.NUGET_SOURCE }}" dotnet nuget push ./nupkg/*.nupkg --source github --api-key "${{ secrets.GITHUB_TOKEN }}" --skip-duplicate From 0eed79e753cbb4429a07f3b3a19fefa5238ea57c Mon Sep 17 00:00:00 2001 From: arthomnix Date: Fri, 10 Apr 2026 16:50:13 +0100 Subject: [PATCH 2/2] Add config option for game CLI arguments --- StarMap.Loader/GameSurveyer.cs | 8 ++++---- StarMap.Loader/Program.cs | 4 ++-- StarMap.Types/LoaderConfig.cs | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/StarMap.Loader/GameSurveyer.cs b/StarMap.Loader/GameSurveyer.cs index 371a191..2500aa1 100644 --- a/StarMap.Loader/GameSurveyer.cs +++ b/StarMap.Loader/GameSurveyer.cs @@ -10,15 +10,17 @@ internal class GameSurveyer : IDisposable private readonly IGameFacade _facade; private readonly AssemblyLoadContext _gameAssemblyContext; private readonly string _gameLocation; + private readonly string[] _args; private Assembly? _game; private IStarMapCore? _core; - public GameSurveyer(IGameFacade facade, AssemblyLoadContext alc, string location) + public GameSurveyer(IGameFacade facade, AssemblyLoadContext alc, string location, string[] args) { _facade = facade; _gameAssemblyContext = alc; _gameLocation = location; + _args = args; } public bool TryLoadCoreAndGame() @@ -51,9 +53,7 @@ public void RunGame() { Debug.Assert(_game is not null, "Load needs to be called before running game"); - string[] args = []; - - _game.EntryPoint!.Invoke(null, [args]); + _game.EntryPoint!.Invoke(null, [_args]); } public void Dispose() diff --git a/StarMap.Loader/Program.cs b/StarMap.Loader/Program.cs index b5a212a..63b75c7 100644 --- a/StarMap.Loader/Program.cs +++ b/StarMap.Loader/Program.cs @@ -36,7 +36,7 @@ static void SoleModeInner() var gameAssemblyContext = new GameAssemblyLoadContext(gameConfig.GameLocation); var dumbFacade = new SoloGameFacade(); - using var gameSurveyer = new GameSurveyer(dumbFacade, gameAssemblyContext, gameConfig.GameLocation); + using var gameSurveyer = new GameSurveyer(dumbFacade, gameAssemblyContext, gameConfig.GameLocation, gameConfig.GameArguments); if (!gameSurveyer.TryLoadCoreAndGame()) { Console.WriteLine("StarMap - Unable to load mod manager and game in solo mode."); @@ -55,7 +55,7 @@ static async Task MainInner(string pipeName) var gameLocation = await facade.Connect(); var gameAssemblyContext = new GameAssemblyLoadContext(Path.GetFullPath(gameLocation)); - var gameSurveyer = new GameSurveyer(facade, gameAssemblyContext, gameLocation); + var gameSurveyer = new GameSurveyer(facade, gameAssemblyContext, gameLocation, []); if (!gameSurveyer.TryLoadCoreAndGame()) return; gameSurveyer.RunGame(); diff --git a/StarMap.Types/LoaderConfig.cs b/StarMap.Types/LoaderConfig.cs index aede82b..4f4309e 100644 --- a/StarMap.Types/LoaderConfig.cs +++ b/StarMap.Types/LoaderConfig.cs @@ -40,10 +40,14 @@ public bool TryLoadConfig() } GameLocation = path; + + GameArguments = config.GameArguments; + return true; } public string GameLocation { get; set; } = ""; public string RepositoryLocation { get; set; } = ""; + public string[] GameArguments { get; set; } = []; } }