From 3d278b3b25fe0b62bec1f196116d175b29c20640 Mon Sep 17 00:00:00 2001 From: Rémy Raes Date: Thu, 29 Aug 2024 15:44:12 +0200 Subject: Hide remote mods in mods display (#799) As they are supposed to be disabled unless joining a server that requires that mod. --- .github/nativefuncs.json | 18 ++++++++++++++++++ .../mod/scripts/vscripts/ui/menu_ns_modmenu.nut | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/.github/nativefuncs.json b/.github/nativefuncs.json index 889432d7..11042903 100644 --- a/.github/nativefuncs.json +++ b/.github/nativefuncs.json @@ -18,6 +18,12 @@ "returnTypeString":"void", "argTypes":"string modName, bool enabled" }, + { + "name":"NSIsModRemote", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, { "name":"NSGetModDescriptionByModName", "helpText":"", @@ -266,6 +272,12 @@ "returnTypeString":"void", "argTypes":"string modName, bool enabled" }, + { + "name":"NSIsModRemote", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, { "name":"NSGetModDescriptionByModName", "helpText":"", @@ -466,6 +478,12 @@ "returnTypeString":"void", "argTypes":"string modName, bool enabled" }, + { + "name":"NSIsModRemote", + "helpText":"", + "returnTypeString":"bool", + "argTypes":"string modName" + }, { "name":"NSGetModDescriptionByModName", "helpText":"", diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut index 3f643aa3..f08d69a7 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut @@ -338,6 +338,10 @@ void function RefreshMods() { string mod = modNames[i] + // Do not display remote mods + if ( NSIsModRemote( mod ) ) + continue + if ( searchTerm.len() && mod.tolower().find( searchTerm ) == null ) continue -- cgit v1.2.3