mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Flip order between GetServerMap and GetServerPlaylist
This commit is contained in:
parent
1ce2a920db
commit
eca293e551
@ -162,25 +162,6 @@ namespace VSquirrel
|
||||
return SQ_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: get server's current playlist via serverlist index
|
||||
//-----------------------------------------------------------------------------
|
||||
SQRESULT GetServerPlaylist(HSQUIRRELVM v)
|
||||
{
|
||||
SQInteger iServer = sq_getinteger(v, 1);
|
||||
if (iServer >= static_cast<SQInteger>(g_pBrowser->m_vServerList.size()))
|
||||
{
|
||||
v_SQVM_RaiseError(v, "Index must be less than %i.\n",
|
||||
static_cast<SQInteger>(g_pBrowser->m_vServerList.size()));
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
string svServerPlaylist = g_pBrowser->m_vServerList[iServer].m_svPlaylist;
|
||||
sq_pushstring(v, svServerPlaylist.c_str(), -1);
|
||||
|
||||
return SQ_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: get server's current map via serverlist index
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -200,6 +181,25 @@ namespace VSquirrel
|
||||
return SQ_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: get server's current playlist via serverlist index
|
||||
//-----------------------------------------------------------------------------
|
||||
SQRESULT GetServerPlaylist(HSQUIRRELVM v)
|
||||
{
|
||||
SQInteger iServer = sq_getinteger(v, 1);
|
||||
if (iServer >= static_cast<SQInteger>(g_pBrowser->m_vServerList.size()))
|
||||
{
|
||||
v_SQVM_RaiseError(v, "Index must be less than %i.\n",
|
||||
static_cast<SQInteger>(g_pBrowser->m_vServerList.size()));
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
string svServerPlaylist = g_pBrowser->m_vServerList[iServer].m_svPlaylist;
|
||||
sq_pushstring(v, svServerPlaylist.c_str(), -1);
|
||||
|
||||
return SQ_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: get server's current player count via serverlist index
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -39,8 +39,8 @@ namespace VSquirrel
|
||||
{
|
||||
SQRESULT GetServerName(HSQUIRRELVM v);
|
||||
SQRESULT GetServerDescription(HSQUIRRELVM v);
|
||||
SQRESULT GetServerPlaylist(HSQUIRRELVM v);
|
||||
SQRESULT GetServerMap(HSQUIRRELVM v);
|
||||
SQRESULT GetServerPlaylist(HSQUIRRELVM v);
|
||||
SQRESULT GetServerCurrentPlayers(HSQUIRRELVM v);
|
||||
SQRESULT GetServerMaxPlayers(HSQUIRRELVM v);
|
||||
SQRESULT GetServerCount(HSQUIRRELVM v);
|
||||
|
@ -83,8 +83,8 @@ void Script_RegisterUIFunctions(CSquirrelVM* pSquirrelVM)
|
||||
// Functions for retrieving server browser data
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerName", "Script_GetServerName", "Gets the name of the server at the specified index of the server list", "string", "int", &VSquirrel::UI::GetServerName);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerDescription", "Script_GetServerDescription", "Gets the description of the server at the specified index of the server list", "string", "int", &VSquirrel::UI::GetServerDescription);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerPlaylist", "Script_GetServerPlaylist", "Gets the playlist of the server at the specified index of the server list", "string", "int", &VSquirrel::UI::GetServerPlaylist);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerMap", "Script_GetServerMap", "Gets the map of the server at the specified index of the server list", "string", "int", &VSquirrel::UI::GetServerMap);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerPlaylist", "Script_GetServerPlaylist", "Gets the playlist of the server at the specified index of the server list", "string", "int", &VSquirrel::UI::GetServerPlaylist);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerCurrentPlayers", "Script_GetServerCurrentPlayers", "Gets the current player count of the server at the specified index of the server list", "int", "int", &VSquirrel::UI::GetServerCurrentPlayers);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerMaxPlayers", "Script_GetServerMaxPlayers", "Gets the max player count of the server at the specified index of the server list", "int", "int", &VSquirrel::UI::GetServerMaxPlayers);
|
||||
Script_RegisterFunction(pSquirrelVM, "GetServerCount", "Script_GetServerCount", "Gets the number of public servers", "int", "", &VSquirrel::UI::GetServerCount);
|
||||
|
Loading…
x
Reference in New Issue
Block a user