Skip to content

Commit

Permalink
Hammer of Thyrion - Support cloud saves
Browse files Browse the repository at this point in the history
  • Loading branch information
d10sfan committed Nov 9, 2023
1 parent ee64926 commit c66c165
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
25 changes: 25 additions & 0 deletions engines/hammerofthyrion/assets/hammerofthyrion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,29 @@ ln -rsf ./data1/Hexen.rc ./data1/hexen.rc
ln -rsf ./data1/Config.cfg ./data1/config.cfg
ln -rsf ./data1/Autoexec.cfg ./data1/autoexec.cfg

if ! [[ -z "${LUX_STEAM_CLOUD}" ]]; then
engine_config_dir="$HOME/.hexen2"
engine_save_dir="$engine_config_dir/data1"
cloud_save_dir="$PWD/data1"
cloud_transfer_run_file="$PWD/luxsteamcloud"

if [ ! -f "${cloud_transfer_run_file}" ]; then
echo "$engine_save_dir"
if [ ! -d "${engine_save_dir}" ]; then
mkdir -p "$engine_save_dir"
fi

if [ -d "${engine_save_dir}" ]; then
cp -rfv "$engine_save_dir"/* "$cloud_save_dir"
mv "$engine_save_dir" "$engine_save_dir"-beforelux
fi

ln -s "$cloud_save_dir" "$engine_save_dir"
touch "$cloud_transfer_run_file"
fi

mv "$engine_save_dir" "$engine_save_dir"-oldlink
ln -s "$cloud_save_dir" "$engine_save_dir"
fi

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./lib" ./glhexen2 -f "$@"
8 changes: 7 additions & 1 deletion metadata/packagessniper_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,12 @@
}
],
"cloudAvailable": true,
"cloudSupported": true
"notices": [
{
"label": "Cloud saves are supported with Hammer of Thyrion"
}
],
"app_id": "9060"
},
{
Expand Down Expand Up @@ -9977,4 +9983,4 @@
"value": "Unworkable Location"
}
]
}
}

0 comments on commit c66c165

Please sign in to comment.