Improve CLI

This commit is contained in:
TheBrokenRail 2020-12-08 18:20:25 -05:00
parent f81bf3c67f
commit c539c42de2

View File

@ -3,22 +3,22 @@
set -e set -e
# All Feature Flags # All Feature Flags
export AVAILABLE_FEATURES=" \ export AVAILABLE_FEATURES="$(echo \
TRUE 'Touch GUI' \ "TRUE 'Touch GUI'" \
TRUE 'Fix Bow & Arrow' \ "TRUE 'Fix Bow & Arrow'" \
TRUE 'Fix Attacking' \ "TRUE 'Fix Attacking'" \
TRUE 'Mob Spawning' \ "TRUE 'Mob Spawning'" \
TRUE 'Fancy Graphics' \ "TRUE 'Fancy Graphics'" \
TRUE 'Disable Autojump By Default' \ "TRUE 'Disable Autojump By Default'" \
TRUE 'Fix Sign Placement' \ "TRUE 'Fix Sign Placement'" \
TRUE 'Show Block Outlines' \ "TRUE 'Show Block Outlines'" \
FALSE 'Expand Creative Inventory' \ "FALSE 'Expand Creative Inventory'" \
FALSE 'Peaceful Mode' \ "FALSE 'Peaceful Mode'" \
TRUE 'Animated Water' \ "TRUE 'Animated Water'" \
TRUE 'Remove Invalid Item Background' \ "TRUE 'Remove Invalid Item Background'" \
TRUE 'Disable gui_blocks Atlas' \ "TRUE 'Disable gui_blocks Atlas'" \
TRUE 'Smooth Lighting' \ "TRUE 'Smooth Lighting'" \
FALSE '3D Anaglyph'" "FALSE '3D Anaglyph'")"
# Print Feature Flags Option # Print Feature Flags Option
if [ "$1" = "--print-features" ]; then if [ "$1" = "--print-features" ]; then
@ -27,8 +27,12 @@ if [ "$1" = "--print-features" ]; then
fi fi
# Ensure Features Are Selected # Ensure Features Are Selected
if [ -z "${MCPI_FEATURES+x}" ]; then
MCPI_FEATURES="$(sh -c "zenity --class 'Minecraft - Pi edition' --list --checklist --column 'Enabled' --column 'Feature' ${AVAILABLE_FEATURES}")" MCPI_FEATURES="$(sh -c "zenity --class 'Minecraft - Pi edition' --list --checklist --column 'Enabled' --column 'Feature' ${AVAILABLE_FEATURES}")"
fi
if [ -z "${MCPI_USERNAME+x}" ]; then
MCPI_USERNAME="$(zenity --class 'Minecraft - Pi edition' --entry --text 'Minecraft Username:' --entry-text 'StevePi')" MCPI_USERNAME="$(zenity --class 'Minecraft - Pi edition' --entry --text 'Minecraft Username:' --entry-text 'StevePi')"
fi
export MCPI_FEATURES export MCPI_FEATURES
export MCPI_USERNAME export MCPI_USERNAME