mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-11-28 03:54:22 +01:00
allow restoring original characters for NSMBW
This commit is contained in:
parent
315c10e27d
commit
ff17f2a5bc
@ -14,6 +14,8 @@ v7.1.0:
|
|||||||
- new download link for Newer Falling Leaf
|
- new download link for Newer Falling Leaf
|
||||||
- fix download link for Midi's Super Mario Wii
|
- fix download link for Midi's Super Mario Wii
|
||||||
- fix download link for Newer Apocalypse
|
- fix download link for Newer Apocalypse
|
||||||
|
- New Super Mario Bros. Wii character mod: allow only restoring
|
||||||
|
original characters without further changes
|
||||||
- update nsmbw.db
|
- update nsmbw.db
|
||||||
|
|
||||||
::game additions
|
::game additions
|
||||||
|
@ -48,9 +48,27 @@ pi_action () {
|
|||||||
if [[ ${choosenplayers[@]} == "" ]]; then
|
if [[ ${choosenplayers[@]} == "" ]]; then
|
||||||
echo -e "Choose a Player to add to the game\n"
|
echo -e "Choose a Player to add to the game\n"
|
||||||
gawk -F : '{print $1 "\t\t" $2 "\t\t" $3}' < "${PATCHIMAGE_DATABASE_DIR}"/nsmbw_characters.db
|
gawk -F : '{print $1 "\t\t" $2 "\t\t" $3}' < "${PATCHIMAGE_DATABASE_DIR}"/nsmbw_characters.db
|
||||||
echo -e "\ntype ???.arc (only one per slot (second column) possible, space separated)"
|
echo -e "\ntype ???.arc (only one per slot (second column) possible, space separated)
|
||||||
|
or type 'restore' to only restore original characters.
|
||||||
|
"
|
||||||
read -r PLAYERS
|
read -r PLAYERS
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf workdir
|
||||||
|
|
||||||
|
echo -e "\n*** 3) extracting image"
|
||||||
|
"${WIT}" extract "${GAMEDIR}"/"${ID}" --psel=data -d workdir -q || exit 51
|
||||||
|
|
||||||
|
if [[ ${PLAYERS[@]} == *restore* ]]; then
|
||||||
|
for backup in Mario.arc Luigi.arc Kinopio.arc koopa.arc; do
|
||||||
|
echo "*** 4) restoring original: ${backup}"
|
||||||
|
cp "${PATCHIMAGE_RIIVOLUTION_DIR}"/"${backup}" workdir/files/Object/
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "*** 5) rebuilding game"
|
||||||
|
echo " (storing game in ${PATCHIMAGE_GAME_DIR}/${ID})"
|
||||||
|
"${WIT}" cp -o -q -B workdir "${PATCHIMAGE_GAME_DIR}"/"${ID}" || exit 51
|
||||||
|
else
|
||||||
for player in "${PLAYERS[@]}"; do
|
for player in "${PLAYERS[@]}"; do
|
||||||
if [[ ! -f "${PATCHIMAGE_DATA_DIR}"/nsmbw_characters/${player} ]]; then
|
if [[ ! -f "${PATCHIMAGE_DATA_DIR}"/nsmbw_characters/${player} ]]; then
|
||||||
echo "unkown character ${player}"
|
echo "unkown character ${player}"
|
||||||
@ -62,12 +80,6 @@ pi_action () {
|
|||||||
|
|
||||||
echo "${choosenplayers[@]}"
|
echo "${choosenplayers[@]}"
|
||||||
echo "choosenplayers=( ${choosenplayers[*]} )" > "${HOME}"/.patchimage.choice
|
echo "choosenplayers=( ${choosenplayers[*]} )" > "${HOME}"/.patchimage.choice
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf workdir
|
|
||||||
|
|
||||||
echo -e "\n*** 3) extracting image"
|
|
||||||
"${WIT}" extract "${GAMEDIR}"/"${ID}" --psel=data -d workdir -q || exit 51
|
|
||||||
|
|
||||||
for backup in Mario.arc Luigi.arc Kinopio.arc koopa.arc; do
|
for backup in Mario.arc Luigi.arc Kinopio.arc koopa.arc; do
|
||||||
if [[ ! -f "${PATCHIMAGE_RIIVOLUTION_DIR}/${backup}" ]]; then
|
if [[ ! -f "${PATCHIMAGE_RIIVOLUTION_DIR}/${backup}" ]]; then
|
||||||
@ -88,6 +100,7 @@ pi_action () {
|
|||||||
echo "*** 6) rebuilding game"
|
echo "*** 6) rebuilding game"
|
||||||
echo " (storing game in ${PATCHIMAGE_GAME_DIR}/${ID})"
|
echo " (storing game in ${PATCHIMAGE_GAME_DIR}/${ID})"
|
||||||
"${WIT}" cp -o -q -B workdir "${PATCHIMAGE_GAME_DIR}"/"${ID}" || exit 51
|
"${WIT}" cp -o -q -B workdir "${PATCHIMAGE_GAME_DIR}"/"${ID}" || exit 51
|
||||||
|
fi
|
||||||
|
|
||||||
rm -rf workdir
|
rm -rf workdir
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user