42 static void AddMapInfo(
string mapName,
string mapDisplayName)
52 string internalMapName;
62 return internalMapName;
68 string displayMapName;
69 string internalMapName = mapName;
70 internalMapName.ToLower();
74 if (mn == internalMapName)
81 if (displayMapName ==
"")
83 displayMapName = mapName;
84 string fc = displayMapName[0];
93 displayMapName[0] = fc;
97 return displayMapName;
112 case "chernarusplus":
129 if (!s_ServerBrowserHelperFunctions)
132 return s_ServerBrowserHelperFunctions;
136class GetServerModListResult
148 string m_Description;
153 string m_MapNameToRun;
161 int m_CurrentNumberPlayers;
162 int m_PlayersInQueue;
163 string m_GameVersion;
164 bool m_IsPasswordProtected;
167 bool m_MouseAndKeyboardEnabled;
168 bool m_WhitelistEnabled;
178 string m_CharactersAlive;
180 string m_SteamFriends;
185 int m_Disable3rdPerson;
187 float m_EnvironmentTimeMul;
188 float m_EnvironmentNightTimeMul;
189 bool m_AllowedFilePatching;
191 int m_SteamQueryPort;
197#ifdef PLATFORM_WINDOWS
200 return GetIP() +
":" + m_HostPort;
206#ifdef PLATFORM_WINDOWS
209 m_Id.Split(
":", parts);
233 if (m_MapNameToRun !=
"")
251 return m_CurrentNumberPlayers;
263 return m_PlayersInQueue;
277 string val1 = this.GetValueStr(sortType);
278 string val2 = other.GetValueStr(sortType);
290 int comparisonResult = other.GetValueInt(sortType) - this.GetValueInt(sortType);
291 if (comparisonResult == 0)
296 comparisonResult = this.CompareTo(other,
ESortType.QUEUE);
300 return comparisonResult;
316 string m_GameVersion;
320 bool m_UseGameVersion;
323 void SetOfficial(
bool Official )
325 m_Official = Official;
326 m_UseOfficial =
true;
329 void SetGameVersion(
string GameVersion )
331 m_GameVersion = GameVersion;
332 m_UseGameVersion =
true;
335 void SetRegionId(
int RegionId )
337 m_RegionId = RegionId;
338 m_UseRegionId =
true;
364 string m_GameVersion;
367 string m_MapNameToRun;
371 bool m_IsPasswordProtected;
378 string m_FavoriteServers;
379 bool m_MouseAndKeyboardEnabled;
380 bool m_WhitelistEnabled;
387 bool m_UseGameVersion;
390 bool m_UseMapNameToRun;
392 bool m_UseMinPlayers;
393 bool m_UseMaxPlayers;
394 bool m_UseIsPasswordProtected;
397 bool m_UseFreeSlotsMin;
398 bool m_UseFreeSlotsMax;
402 bool m_UseMouseAndKeyboardEnabled;
403 bool m_UseWhitelistEnabled;
406 void SetAntiCheatFilter(
bool anti_cheat )
408 m_AntiCheat = anti_cheat;
409 m_UseAntiCheat =
true;
412 void SetNameFilter(
string name )
418 void SetGameTypeFilter(
string game_type )
420 m_GameType = game_type;
421 m_UseGameType =
true;
424 void SetModeIdFilter(
int mode_id )
430 void SetGameVersionFilter(
string game_version )
432 m_GameVersion = game_version;
433 m_UseGameVersion =
true;
436 void SetOfficialFilter(
bool official )
438 m_Official = official;
439 m_UseOfficial =
true;
442 void SetJoinableFilter(
bool joinable )
444 m_Joinable = joinable;
445 m_UseJoinable =
true;
448 void SetMapNameToRun(
string mapNameToRun )
450 m_MapNameToRun = mapNameToRun;
451 m_UseMapNameToRun =
true;
454 void SetIsModdedFilter(
bool is_modded )
456 m_IsModded = is_modded;
457 m_UseIsModded =
true;
460 void SetMinPlayersFilter(
int min_players )
462 m_MinPlayers = min_players;
463 m_UseMinPlayers =
true;
466 void SetMaxPlayersFilter(
int max_players )
468 m_MaxPlayers = max_players;
469 m_UseMaxPlayers =
true;
472 void SetIsPasswordProtectedFilter(
bool password_protected )
474 m_IsPasswordProtected = password_protected;
475 m_UseIsPasswordProtected =
true;
478 void SetRegionIdFilter(
int region )
481 m_UseRegionId =
true;
484 void SetPriorityFilter(
int priority )
486 m_Priority = priority;
487 m_UsePriority =
true;
490 void SetFreeSlotsMin(
int freeSlotsMin )
492 m_FreeSlotsMin = freeSlotsMin;
493 m_UseFreeSlotsMin =
true;
496 void SetFreeSlotsMax(
int freeSlotsMax )
498 m_FreeSlotsMax = freeSlotsMax;
499 m_UseFreeSlotsMax =
true;
502 void SetHostIp(
string hostIp )
508 void SetHostPort(
int hostPort )
510 m_HostPort = hostPort;
511 m_UseHostPort =
true;
514 void SetMouseAndKeyboardEnabled(
bool enabledMouseAndKeyboard)
516 m_MouseAndKeyboardEnabled = enabledMouseAndKeyboard;
517 m_UseMouseAndKeyboardEnabled =
true;
520 void SetFavorited(
bool show )
527 void SetFriendsPlaying(
bool show )
533 void SetPreviouslyPlayed(
bool show )
539 void SetProperVersionMatch(
bool show )
545 void SetFullServer(
bool show )
551 void SetThirdPerson(
bool show )
557 void SetPublic(
bool show )
563 void SetAcceleratedTime(
bool show )
569 void SetAllowedFilePatching(
bool show )
580 void SetPingFilter(
int pingMaxValue )
582 m_SortBy +=
"M" + pingMaxValue +
";";
585 void SetBattleyeProtection(
bool show)
591 void SetPassworded(
bool show)
597 void AddShow(
bool show )
605 void AddFavourite(
string ip,
int port)
607 m_FavoriteServers += ip +
";" + port +
";";
610 void SetWhitelistEnabled(
bool whitelistEnabled)
612 m_WhitelistEnabled = whitelistEnabled;
613 m_UseWhitelistEnabled =
true;
616 AddShow(whitelistEnabled);
619 void SetIsDLC(
bool isDLC)
650 proto native
void AddServerFavorite(
string ipAddress,
int port,
int steamQueryPort);
651 proto native
void RemoveServerFavorite(
string ipAddress,
int port,
int steamQueryPort);
652 proto native
void GetFavoriteServers(
TStringArray favServers);
663 proto native
EBiosError GetServerModList(
string serverId);
687 void OnServerModList(GetServerModListResult result_list,
EBiosError error)
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
class ServerBrowserHelperFunctions m_Id
array< ref GetServersResultRow > GetServersResultRowArray
Param4< string, string, int, int > CachedServerInfo
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
GetServersResult the output structure of the GetServers operation.
GetServersResultRow the output structure of the GetServers operation that represents one game server.
static void OnLoadServersAsync(GetServersResult result_list, EBiosError error, string response)
static void OnGetServerModList(GetServerModListResult result_list, EBiosError error)
static void OnAutoConnectToEmptyServer(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
static void AddMapInfo(string mapName, string mapDisplayName)
static string GetServerMapImagePath(string mapName)
static const string SAKHAL_MAP_IMAGE
static ref map< string, string > INTERNAL_MAP_NAMES
static ServerBrowserHelperFunctions GetInstance()
static const string LIVONIA_MAP_IMAGE
static string GetMapDisplayName(string mapName)
static const string LOWERCASE_ALPHABET
static const string CHERNARUS_MAP_IMAGE
static string GetInternalMapName(string mapName)
void ServerBrowserHelperFunctions()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.