From 05b4e3b06a675eda7efb2fb44b87a6223c45e076 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sat, 14 Jan 2017 20:29:56 +0100 Subject: [PATCH] Checks done differently --- lgsm/functions/mods_list.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index f4c1910b5..42a301499 100644 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -234,6 +234,11 @@ fn_mods_show_available(){ # Increment index from the amount of values we just displayed let "compatiblemodslistindex+=4" done + # If no mods are found + if [ -z "${compatiblemodslist}" ]; then + fn_print_fail "No mods are currently available for ${gamename}." + core_exit.sh + fi } # Get details of a mod any (relevant and unique, such as full mod name or install command) value @@ -262,25 +267,6 @@ fn_mod_get_info_from_command(){ done } -# Requirements to install mods -fn_mods_install_checks(){ - # If no mods are found - if [ -z "${compatiblemodslist}" ]; then - fn_print_fail "No mods are currently available for ${gamename}." - core_exit.sh - # If systemdir doesn't exist, then the game isn't installed - elif [ ! -d "${systemdir}" ]; then - fn_print_fail "${gamename} needs to be installed first." - core_exit.sh - # If tompdir variable doesn't exist, LGSM is too old - elif [ -z "${tmpdir}" ]||[ -z "${lgsmdir}" ]; then - fn_print_fail "Your LGSM version is too old." - echo " * Please do a full update, including ${selfname} script." - core_exit.sh - fi -} - fn_mods_scrape_urls fn_mods_info fn_mods_available -fn_mods_install_checks