aboutsummaryrefslogtreecommitdiff
path: root/primedev/scripts
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2024-05-21 22:55:26 +0200
committerGitHub <noreply@github.com>2024-05-21 22:55:26 +0200
commitd1d4f2a086209f041fa357e03fdf93614a7a9fd7 (patch)
tree290b09ba4b9eec05deaf6dd44d7bd8afad86c31b /primedev/scripts
parent60d872d3756854d29b65b63fb146aa4f638dd29e (diff)
parent220b7a1bf7915a336b9c2a08806e60c1c32bde8e (diff)
downloadNorthstarLauncher-chore/revert-zlib-cmake-fix.tar.gz
NorthstarLauncher-chore/revert-zlib-cmake-fix.zip
Merge branch 'main' into chore/revert-zlib-cmake-fixchore/revert-zlib-cmake-fix
Diffstat (limited to 'primedev/scripts')
-rw-r--r--primedev/scripts/client/scriptbrowserhooks.cpp3
-rw-r--r--primedev/scripts/client/scriptmainmenupromos.cpp1
-rw-r--r--primedev/scripts/client/scriptmodmenu.cpp1
-rw-r--r--primedev/scripts/client/scriptserverbrowser.cpp4
-rw-r--r--primedev/scripts/scriptdatatables.cpp37
5 files changed, 9 insertions, 37 deletions
diff --git a/primedev/scripts/client/scriptbrowserhooks.cpp b/primedev/scripts/client/scriptbrowserhooks.cpp
index 86b4a356..dcf051d2 100644
--- a/primedev/scripts/client/scriptbrowserhooks.cpp
+++ b/primedev/scripts/client/scriptbrowserhooks.cpp
@@ -9,7 +9,8 @@ void, __fastcall, (char* pUrl, char flags))
// clang-format on
{
bool bIsOriginOverlayEnabledOriginal = *bIsOriginOverlayEnabled;
- if (flags & 2 && !strncmp(pUrl, "http", 4)) // custom force external browser flag
+ bool isHttp = !strncmp(pUrl, "http://", 7) || !strncmp(pUrl, "https://", 8);
+ if (flags & 2 && isHttp) // custom force external browser flag
*bIsOriginOverlayEnabled = false; // if this bool is false, game will use an external browser rather than the origin overlay one
OpenExternalWebBrowser(pUrl, flags);
diff --git a/primedev/scripts/client/scriptmainmenupromos.cpp b/primedev/scripts/client/scriptmainmenupromos.cpp
index ecb47af7..91bc3002 100644
--- a/primedev/scripts/client/scriptmainmenupromos.cpp
+++ b/primedev/scripts/client/scriptmainmenupromos.cpp
@@ -23,6 +23,7 @@ enum eMainMenuPromoDataProperty
};
ADD_SQFUNC("void", NSRequestCustomMainMenuPromos, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
g_pMasterServerManager->RequestMainMenuPromos();
return SQRESULT_NULL;
}
diff --git a/primedev/scripts/client/scriptmodmenu.cpp b/primedev/scripts/client/scriptmodmenu.cpp
index a88478fb..2e877db4 100644
--- a/primedev/scripts/client/scriptmodmenu.cpp
+++ b/primedev/scripts/client/scriptmodmenu.cpp
@@ -160,6 +160,7 @@ ADD_SQFUNC(
ADD_SQFUNC("void", NSReloadMods, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
g_pModManager->LoadMods();
return SQRESULT_NULL;
}
diff --git a/primedev/scripts/client/scriptserverbrowser.cpp b/primedev/scripts/client/scriptserverbrowser.cpp
index 21324535..b946f7a9 100644
--- a/primedev/scripts/client/scriptserverbrowser.cpp
+++ b/primedev/scripts/client/scriptserverbrowser.cpp
@@ -8,6 +8,7 @@
ADD_SQFUNC("void", NSRequestServerList, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
g_pMasterServerManager->RequestServerList();
return SQRESULT_NULL;
}
@@ -32,6 +33,7 @@ ADD_SQFUNC("int", NSGetServerCount, "", "", ScriptContext::UI)
ADD_SQFUNC("void", NSClearRecievedServerList, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
g_pMasterServerManager->ClearServerList();
return SQRESULT_NULL;
}
@@ -114,6 +116,7 @@ ADD_SQFUNC("void", NSConnectToAuthedServer, "", "", ScriptContext::UI)
ADD_SQFUNC("void", NSTryAuthWithLocalServer, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
// do auth request
g_pMasterServerManager->AuthenticateWithOwnServer(g_pLocalPlayerUserID, g_pMasterServerManager->m_sOwnClientAuthToken);
@@ -122,6 +125,7 @@ ADD_SQFUNC("void", NSTryAuthWithLocalServer, "", "", ScriptContext::UI)
ADD_SQFUNC("void", NSCompleteAuthWithLocalServer, "", "", ScriptContext::UI)
{
+ NOTE_UNUSED(sqvm);
// literally just set serverfilter
// note: this assumes we have no authdata other than our own
if (g_pServerAuthentication->m_RemoteAuthenticationData.size())
diff --git a/primedev/scripts/scriptdatatables.cpp b/primedev/scripts/scriptdatatables.cpp
index 865b6243..5e685b48 100644
--- a/primedev/scripts/scriptdatatables.cpp
+++ b/primedev/scripts/scriptdatatables.cpp
@@ -59,42 +59,6 @@ struct CSVData
std::unordered_map<std::string, CSVData> CSVCache;
-Vector3 StringToVector(char* pString)
-{
- Vector3 vRet;
-
- int length = 0;
- while (pString[length])
- {
- if ((pString[length] == '<') || (pString[length] == '>'))
- pString[length] = '\0';
- length++;
- }
-
- int startOfFloat = 1;
- int currentIndex = 1;
-
- while (pString[currentIndex] && (pString[currentIndex] != ','))
- currentIndex++;
- pString[currentIndex] = '\0';
- vRet.x = std::stof(&pString[startOfFloat]);
- startOfFloat = ++currentIndex;
-
- while (pString[currentIndex] && (pString[currentIndex] != ','))
- currentIndex++;
- pString[currentIndex] = '\0';
- vRet.y = std::stof(&pString[startOfFloat]);
- startOfFloat = ++currentIndex;
-
- while (pString[currentIndex] && (pString[currentIndex] != ','))
- currentIndex++;
- pString[currentIndex] = '\0';
- vRet.z = std::stof(&pString[startOfFloat]);
- startOfFloat = ++currentIndex;
-
- return vRet;
-}
-
// var function GetDataTable( asset path )
REPLACE_SQFUNC(GetDataTable, (ScriptContext::UI | ScriptContext::CLIENT | ScriptContext::SERVER))
{
@@ -817,6 +781,7 @@ void ConCommand_dump_datatable(const CCommand& args)
void ConCommand_dump_datatables(const CCommand& args)
{
+ NOTE_UNUSED(args);
// likely not a comprehensive list, might be missing a couple?
static const std::vector<const char*> VANILLA_DATATABLE_PATHS = {
"datatable/burn_meter_rewards.rpak",