first code for moving to new game launch system, stuff is likely broken.

This commit is contained in:
Storm Dragon
2024-12-21 12:09:13 -05:00
parent 42b40489ce
commit cdfcf7aacf
20 changed files with 63 additions and 55 deletions

30
.launch/TobyCustom/.mapmenu Executable file
View File

@ -0,0 +1,30 @@
# Choice of maps
mapList=(
"${gamePath}/OpMDK.wad"
"${gamePath}/TobyDoomLevels.wad"
"${gamePath}/Toby-Demo-Level.wad"
)
declare -a mapMenu=('none' 'None')
for i in "${mapList[@]}" ; do
if [[ -e "$i" ]]; then
title="${i##*/}"
title="${title%.*}"
title="${title/OpMDK/Operation MDK}"
title="${title/-/ }"
mapMenu+=("$i" "$title")
fi
done
map="$(dialog --backtitle "Select Map" \
--clear \
--no-tags \
--cancel-label "Exit" \
--ok-label "Next" \
--menu "Please select one" 0 0 0 "${mapMenu[@]}" --stdout)"
[[ $? -ne 0 ]] && exit 0
if [[ "${map}" != "none" ]]; then
gameOption=("$map" "${gameOption[@]}")
fi
if [[ "${map}" == ""${gamePath}/TobyDoomLevels.wad"" ]]; then
gameOption=("$map" "${gameOption[@]}" "${gamePath}/Toby-Doom-Level-Music-Renamer.pk3")
fi