From 9fd61ddbbee62b9db0cec7569c2c4d06a73bf057 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Wed, 30 Nov 2022 14:20:44 -0800 Subject: [PATCH] nuclide, nuclide-ds: Use /home/eukara/Library/Games if available to dump configs/saves in --- nuclide | 11 ++++++++--- nuclide-ds | 20 ++++++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/nuclide b/nuclide index 0385ce36..db5d33d6 100755 --- a/nuclide +++ b/nuclide @@ -2,14 +2,19 @@ set -e SRCPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" +if [ -d "$HOME/Library/Games" ] +then + ADDITIONAL_ARGS="-usehome -homedir ${HOME}/Library/Games/Nuclide" +fi + cd "$SRCPATH/bin" if [ -f "$SRCPATH/bin/fteqw" ]; then if [ -z "$NUCLIDE_GDB" ]; then - ./fteqw -basedir ../ $* + ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* else - gdb --args ./fteqw -basedir ../ $* + gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* fi else printf "Engine is not present, please run build_engine.sh\n" -fi +fi \ No newline at end of file diff --git a/nuclide-ds b/nuclide-ds index b814ee88..8e6bd334 100755 --- a/nuclide-ds +++ b/nuclide-ds @@ -1,10 +1,22 @@ #!/bin/sh set -e SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" -PATH="$SCRPATH"/bin:"$PATH" -if [ -f "$SCRPATH"/bin/fteqw-sv ]; then - fteqw-sv $* +# We want to keep our library separate +if [ -d "$HOME/Library/Games" ] +then + ADDITIONAL_ARGS="-usehome -homedir ${HOME}/Library/Games/Nuclide" +fi + + +cd "$SRCPATH/bin" + +if [ -f "$SRCPATH/bin/fteqw-sv" ]; then + if [ -z "$NUCLIDE_GDB" ]; then + ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ $* + else + gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* + fi else printf "Engine is not present, please run build_engine.sh\n" -fi +f \ No newline at end of file