Code to import translation file if found for BK3. This may be buggy, please report any problems. Dict.dat should be located either in Downloads or Desktop for this to work.

This commit is contained in:
Storm Dragon 2022-09-26 04:01:33 -04:00
parent 98d3d0617c
commit b7c68c3a04

View File

@ -777,6 +777,10 @@ game_launcher() {
fi
if [[ "$game" =~ bokurano-daibouken-3 ]]; then
pgrep -u "$USER" nvda2speechd &> /dev/null || ${XDG_DATA_HOME:-$HOME/.local/share}/audiogame-manager/nvda2speechd &
dictPath="$(winepath "${winePath}")"
if [[ -r "${cache}/bk3-dict.dat" ]] && [[ ! -r "${dictPath}/dict.dat" ]]; then
cp "${cache}/bk3-dict.dat" "${dictPath}/dict.dat"
fi
fi
if [[ "$game" =~ sequence-storm ]]; then
[[ -x ~/.SequenceStormReader ]] && ~/.SequenceStormReader &
@ -1597,6 +1601,15 @@ case "${game}" in
add_launcher "c:\Program Files\bloodshed.exe"
;;
"Bokurano Daibouken 3")
dictFile=""
for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do
if [[ -r "$i" ]]; then
dictFile="$i"
fi
done
if [[ "$i" != "" ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then
dialog --backtitle "Audiogame manager" --yesno "Possible English translation file found at $dictFile. Would you like to use it for BK3?" -1 -1 --stdout && cp -v "$dictFile" "${cache}/bk3-dict.dat"
fi
export bottle="nyanchan"
export winVer="win7"
install_wine_bottle