From 10e32e8905c5b4df7a5551d3311765983db61775 Mon Sep 17 00:00:00 2001 From: Lana Date: Sat, 25 Jul 2026 19:31:41 +1000 Subject: [PATCH] feat: added command line options to the ProcessBuilder, as it wasn't receiving savedatafolder before --- src/rider/main/kotlin/run/RunConfiguration.kt | 1 + src/rider/main/kotlin/run/RunState.kt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rider/main/kotlin/run/RunConfiguration.kt b/src/rider/main/kotlin/run/RunConfiguration.kt index 049a355..353aca2 100644 --- a/src/rider/main/kotlin/run/RunConfiguration.kt +++ b/src/rider/main/kotlin/run/RunConfiguration.kt @@ -106,6 +106,7 @@ class RunConfiguration(project: Project, factory: ConfigurationFactory, name: St getScriptName(), getSaveFilePath(), getModListPath(), + getCommandLineOptions(), getRimworldState(environment), UnityDebugRemoteConfiguration(), environment, diff --git a/src/rider/main/kotlin/run/RunState.kt b/src/rider/main/kotlin/run/RunState.kt index 72ed7bf..77d396f 100644 --- a/src/rider/main/kotlin/run/RunState.kt +++ b/src/rider/main/kotlin/run/RunState.kt @@ -24,6 +24,7 @@ class RunState( private val rimworldLocation: String, private val saveFilePath: String, private val modListPath: String, + private val commandLineOptions: String, private val rimworldState: RunProfileState, remoteConfiguration: RemoteConfiguration, executionEnvironment: ExecutionEnvironment, @@ -97,7 +98,10 @@ class RunState( val bashScriptPath = "${Path(rimworldLocation).parent}/run.sh" withContext(Dispatchers.IO) { val logFile = File(System.getProperty("java.io.tmpdir"), "rimworld-doorstop.log") - ProcessBuilder("/bin/sh", bashScriptPath, rimworldLocation) + val cmdArgs = mutableListOf("/bin/sh", bashScriptPath, rimworldLocation) + val extraArgs = commandLineOptions.split(' ').filter { it.isNotEmpty() } + cmdArgs.addAll(extraArgs) + ProcessBuilder(cmdArgs) .redirectErrorStream(true) .redirectOutput(logFile) .start()