diff --git a/src/pc/djui/djui_panel_host_mods.c b/src/pc/djui/djui_panel_host_mods.c index 7ec04767..beaa1c4d 100644 --- a/src/pc/djui/djui_panel_host_mods.c +++ b/src/pc/djui/djui_panel_host_mods.c @@ -74,7 +74,7 @@ static void djui_mod_checkbox_on_hover_end(UNUSED struct DjuiBase* base) { static void djui_mod_checkbox_on_value_change(UNUSED struct DjuiBase* base) { mods_update_selectable(); - if (mods_get_enabled_count() >= 10) { + if (mods_get_enabled_count() - mods_get_character_select_count() >= 10) { if (!sWarned) { sWarned = true; djui_popup_create(DLANG(HOST_MODS, WARNING), 3); diff --git a/src/pc/mods/mods.c b/src/pc/mods/mods.c index ee881d0c..5a788377 100644 --- a/src/pc/mods/mods.c +++ b/src/pc/mods/mods.c @@ -49,6 +49,18 @@ u16 mods_get_enabled_count(void) { return enabled; } +u16 mods_get_character_select_count(void) { + u16 enabled = 0; + + for (u16 i = 0; i < gLocalMods.entryCount; i++) { + struct Mod* mod = gLocalMods.entries[i]; + if (!mod->enabled || strcmp(mod->name, "[CS]")) { continue; } + enabled++; + } + + return enabled; +} + u8 mods_has_autoexec_mod(void) { for (u16 i = 0; i < gLocalMods.entryCount; i++) { if (mod_get_is_autoexec(gLocalMods.entries[i])) { return TRUE; } diff --git a/src/pc/mods/mods.h b/src/pc/mods/mods.h index 3e2dbdad..a589b2bb 100644 --- a/src/pc/mods/mods.h +++ b/src/pc/mods/mods.h @@ -24,6 +24,7 @@ extern char gRemoteModsBasePath[]; void mods_get_main_mod_name(char* destination, u32 maxSize); u16 mods_get_enabled_count(void); +u16 mods_get_character_select_count(void); u8 mods_has_autoexec_mod(void); bool mods_generate_remote_base_path(void); void mods_activate(struct Mods* mods);