|
Enfusion Script API
|
Object containing info and interaction methods for game servers. More...
Public Member Functions | |
| proto external string | GetId () |
| Returns unique ID of this server. | |
| proto external string | GetName () |
| Returns name of this server. | |
| proto external string | GetDescription () |
| Returns description of this server. | |
| proto external EServerType | GetServerType () |
| Returns type of the server which specifies how it was hosted. | |
| proto external int | GetMaxPlayers () |
| Returns count of max players that can be connected to the server. | |
| proto external int | GetPlayerCount () |
| Returns count of currently connected players on the server. | |
| proto external bool | IsOnline () |
| Returns true if server is indicated as currently online (running) | |
| proto external void | SetFavorite (notnull BackendCallback callback, bool isFavorite) |
| Will request change for favorite mark state for this server. | |
| proto external bool | IsFavorite () |
| Returns true if client has this server marked as favorite. | |
| proto external int | GetSecondsSinceLastJoin () |
| Returns how long ago user last joined this server in seconds. | |
| proto external bool | IsVisible () |
| Returns true if server is configured to be visible in ServerCatalogue. | |
| proto external bool | IsJoinable () |
| Returns true if server is in state in which clients can join it. | |
| proto external bool | IsMyPlatformSupported () |
| Returns true if platform of the client is supported by the server. | |
| proto external bool | IsCrossPlatform () |
| Returns true if server supports my and at least one more platform. | |
| proto external bool | IsPasswordProtected () |
| Returns true if server requires password for further requests to more detailed info about the server or to request join to the server. | |
| proto external void | SetPassword (string password) |
| Sets password for this server. | |
| proto external string | GetPassword () |
| Returns currently set password for joining the server. | |
| proto external int | GetModCount () |
| Returns count of how many mods is server using. | |
| proto external void | RequestJoin (notnull BackendCallback callback, func onDetails=null) |
| Will request join to the server which will assign slot for player and provide authentication tokens for encrypted communication with the server. | |
| proto external void | RequestDetails (notnull BackendCallback callback) |
| Will request full details about the server which are not automatically provided when browsing in the catalogue. | |
Object containing info and interaction methods for game servers.
They are initialized, managed and cleared by native systems and script should only interact with those provided by ServerCatalogueApi.
| proto external string ServerInfo.GetDescription | ( | ) |
Returns description of this server.
| proto external string ServerInfo.GetId | ( | ) |
Returns unique ID of this server.
| proto external int ServerInfo.GetMaxPlayers | ( | ) |
Returns count of max players that can be connected to the server.
| proto external int ServerInfo.GetModCount | ( | ) |
Returns count of how many mods is server using.
| proto external string ServerInfo.GetName | ( | ) |
Returns name of this server.
| proto external string ServerInfo.GetPassword | ( | ) |
Returns currently set password for joining the server.
| proto external int ServerInfo.GetPlayerCount | ( | ) |
Returns count of currently connected players on the server.
| proto external int ServerInfo.GetSecondsSinceLastJoin | ( | ) |
Returns how long ago user last joined this server in seconds.
| proto external EServerType ServerInfo.GetServerType | ( | ) |
Returns type of the server which specifies how it was hosted.
| proto external bool ServerInfo.IsCrossPlatform | ( | ) |
Returns true if server supports my and at least one more platform.
| proto external bool ServerInfo.IsFavorite | ( | ) |
Returns true if client has this server marked as favorite.
| proto external bool ServerInfo.IsJoinable | ( | ) |
Returns true if server is in state in which clients can join it.
| proto external bool ServerInfo.IsMyPlatformSupported | ( | ) |
Returns true if platform of the client is supported by the server.
| proto external bool ServerInfo.IsOnline | ( | ) |
Returns true if server is indicated as currently online (running)
| proto external bool ServerInfo.IsPasswordProtected | ( | ) |
Returns true if server requires password for further requests to more detailed info about the server or to request join to the server.
| proto external bool ServerInfo.IsVisible | ( | ) |
Returns true if server is configured to be visible in ServerCatalogue.
| proto external void ServerInfo.RequestDetails | ( | notnull BackendCallback | callback | ) |
Will request full details about the server which are not automatically provided when browsing in the catalogue.
It is not necessary to perform before joining the server since it will always be performed automatically to ensure that client can actually join or to show possible warnings before join.
| proto external void ServerInfo.RequestJoin | ( | notnull BackendCallback | callback, |
| func | onDetails = null ) |
Will request join to the server which will assign slot for player and provide authentication tokens for encrypted communication with the server.
This method will also set both JoiningServer and LastServer to this in ServerCatalogueApi.
| onDetails | is optional function which will be invoked when full server details are received and can be used to make final validations before join. Delete of BackendCallback provided to the request will stop join process. |
| VME | - If server is not joinable - IsJoinable() returns false.
|
| proto external void ServerInfo.SetFavorite | ( | notnull BackendCallback | callback, |
| bool | isFavorite ) |
Will request change for favorite mark state for this server.
| VME | - if set to state which is already set is attempted IsFavorite() == isFavorite |
| proto external void ServerInfo.SetPassword | ( | string | password | ) |
Sets password for this server.
When used for server obtained by ServerCatalogue it will serve for client authentication.