From a3ebe721232f7408e22104eda788c4266ac1bc69 Mon Sep 17 00:00:00 2001 From: xe1os <39219862+xe1os@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:09:39 +0530 Subject: [PATCH] Implement CS2 mod dependency checks Added dependency checks for CS2 mods and warnings for WeaponPaints. --- lgsm/modules/command_mods_install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh index 104f7a553..48265ea94 100755 --- a/lgsm/modules/command_mods_install.sh +++ b/lgsm/modules/command_mods_install.sh @@ -122,6 +122,23 @@ if [ "${modcommand}" == "amxmodxcs" ] \ fn_mod_exist "amxmodx" fi +# CS2 dependency checks. +if [ "${modcommand}" == "cssharp" ]; then + fn_mod_exist "metamodsource2" +fi + +if [ "${modcommand}" == "simpleadmin" ] \ + || [ "${modcommand}" == "matchzy" ] \ + || [ "${modcommand}" == "weaponpaints" ]; then + fn_mod_exist "metamodsource2" + fn_mod_exist "cssharp" +fi + +if [ "${modcommand}" == "weaponpaints" ]; then + fn_print_warning_nl "WeaponPaints also requires PlayerSettingsCS2, AnyBaseLibCS2, MenuManagerCS2, and MySQL configuration." + fn_print_information_nl "Install those dependencies before starting the server, or WeaponPaints may fail to load." +fi + fn_create_mods_dir fn_mods_clear_tmp_dir fn_mods_create_tmp_dir