Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
SocialComponent Interface Reference

Component responsible for handling social interactions b/w 2 players. More...

Inheritance diagram for SocialComponent:
[legend]

Public Member Functions

proto external bool IsRestricted (int otherPlayerID, EUserInteraction interaction)
 Is the given interaction b/w this and otherPlayer allowed? Returns false in case of invalid arguments.
 
proto external bool IsBlocked (int otherPlayerID)
 Determines if otherPlayer is blocked by this player.
 
proto external bool IsBlockedIdentity (string identity, PlatformKind platform, string platformIdHash)
 Determines if otherPlayer is blocked by this player.
 
proto external void Block (BlockListRequestCallback callback, int otherPlayerID)
 Blocks given player using BlockListApi.
 
proto external bool Unblock (BlockListRequestCallback callback, int otherPlayerID)
 Removes given player from game block list.
 
proto external bool IsMuted (int otherPlayerID)
 Determines if otherPlayer is muted by this player for the duration of the game session.
 
proto external void SetMuted (int otherPlayerID, bool mute)
 Mutes/unmutes otherPlayer for the duration of the game session.
 
proto external void ReportPlayer (int reportedPlayerID, SCR_EReportReason reason)
 Reports inappropriate player behaviour into BackendApi.
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Static Public Member Functions

static proto bool IsPrivilegedTo (EUserInteraction interaction)
 Is local user privileged to participate in given interaction?
 
static proto bool RequestSocialPrivilege (EUserInteraction interaction, PrivilegeCallback cb)
 Requests the local user privilege associated with given interaction.
 
static proto bool IsMultiplayerAllowed ()
 Is local user allowed to participate in multiplayer?
 
static proto bool RequestMultiplayerPrivilege (PrivilegeCallback cb)
 Requests the local user privilege to participate in multiplayer games.
 
static proto int GetBlockedPlayers (notnull array< BlockListItem > outItems)
 Fills the provided array with the informations about blocked players.
 
static proto void UpdateBlockList ()
 Requests update of block list using BlockListApi.
 
static proto void CheckBlockedPlayersInRoom (Room room)
 Requests to check blokced players in a room.
 

Public Attributes

ref ScriptInvoker< int > m_OnBlockedPlayerJoinedInvoker = new ScriptInvoker<int>()
 
ref ScriptInvoker< int, bool > m_OnReportPlayerFinishInvoker = new ScriptInvoker<int, bool>()
 

Static Public Attributes

static ref ScriptInvoker< bool > s_OnBlockListUpdateInvoker = new ScriptInvoker<bool>()
 
static ref ScriptInvoker< Room, array< BlockedRoomPlayer > > s_OnCheckedBlockedPlayersInRoomInvoker = new ScriptInvoker<Room, array<BlockedRoomPlayer>>()
 

Protected Member Functions

void OnBlockedPlayerJoined (int joinedPlayerID)
 Event invoked when player present on a platform or game blocklist joins the server.
 
void OnReportPlayerFinish (int reportedPlayerID, bool success)
 Event invoked as a result of ReportPlayer.
 

Static Protected Member Functions

static void OnBlockListUpdate (bool success)
 Event invoked as a result of UpdateBlockList.
 
static void OnCheckedBlockedPlayersInRoom (Room room, array< BlockedRoomPlayer > blockedPlayers)
 Event invoked as a result of CheckBlockedPlayersInRoom.
 

Detailed Description

Component responsible for handling social interactions b/w 2 players.

Gathers restrictions from different sources like platform user permissions/privileges. This component is meant to be on the Player Controller.

Member Function Documentation

◆ Block()

proto external void SocialComponent.Block ( BlockListRequestCallback  callback,
int  otherPlayerID 
)

Blocks given player using BlockListApi.

Uses provided callback as result. In case of full block list, error with code = EBERR_STORAGE_IS_FULL and apiCode = EACODE_ERROR_REQUEST_ERROR

◆ CheckBlockedPlayersInRoom()

static proto void SocialComponent.CheckBlockedPlayersInRoom ( Room  room)
static

Requests to check blokced players in a room.

Invokes OnCheckedBlockedPlayersInRoom when finished.

◆ GetBlockedPlayers()

static proto int SocialComponent.GetBlockedPlayers ( notnull array< BlockListItem >  outItems)
static

Fills the provided array with the informations about blocked players.

Returns
Number of blocked players

◆ IsBlocked()

proto external bool SocialComponent.IsBlocked ( int  otherPlayerID)

Determines if otherPlayer is blocked by this player.

All player interactions are restricted if one player is blocked. Returns false in case of invalid argument.

◆ IsBlockedIdentity()

proto external bool SocialComponent.IsBlockedIdentity ( string  identity,
PlatformKind  platform,
string  platformIdHash 
)

Determines if otherPlayer is blocked by this player.

All player interactions are restricted if one player is blocked. Returns false in case of invalid argument.

Parameters
identityGame backend identity id
platformPlatform of other player
platformIdHashHash of platform specific identifier

◆ IsMultiplayerAllowed()

static proto bool SocialComponent.IsMultiplayerAllowed ( )
static

Is local user allowed to participate in multiplayer?

◆ IsMuted()

proto external bool SocialComponent.IsMuted ( int  otherPlayerID)

Determines if otherPlayer is muted by this player for the duration of the game session.

Only VoiceChat UserInteraction is affected. Returns false in case of invalid argument.

◆ IsPrivilegedTo()

static proto bool SocialComponent.IsPrivilegedTo ( EUserInteraction  interaction)
static

Is local user privileged to participate in given interaction?

◆ IsRestricted()

proto external bool SocialComponent.IsRestricted ( int  otherPlayerID,
EUserInteraction  interaction 
)

Is the given interaction b/w this and otherPlayer allowed? Returns false in case of invalid arguments.

◆ OnBlockedPlayerJoined()

void SocialComponent.OnBlockedPlayerJoined ( int  joinedPlayerID)
protected

Event invoked when player present on a platform or game blocklist joins the server.

◆ OnBlockListUpdate()

static void SocialComponent.OnBlockListUpdate ( bool  success)
staticprotected

Event invoked as a result of UpdateBlockList.

◆ OnCheckedBlockedPlayersInRoom()

static void SocialComponent.OnCheckedBlockedPlayersInRoom ( Room  room,
array< BlockedRoomPlayer blockedPlayers 
)
staticprotected

Event invoked as a result of CheckBlockedPlayersInRoom.

◆ OnReportPlayerFinish()

void SocialComponent.OnReportPlayerFinish ( int  reportedPlayerID,
bool  success 
)
protected

Event invoked as a result of ReportPlayer.

◆ ReportPlayer()

proto external void SocialComponent.ReportPlayer ( int  reportedPlayerID,
SCR_EReportReason  reason 
)

Reports inappropriate player behaviour into BackendApi.

◆ RequestMultiplayerPrivilege()

static proto bool SocialComponent.RequestMultiplayerPrivilege ( PrivilegeCallback  cb)
static

Requests the local user privilege to participate in multiplayer games.

Parameters
callbackCallback object used to obtain result.
Returns
Returns true on successful request placement.

◆ RequestSocialPrivilege()

static proto bool SocialComponent.RequestSocialPrivilege ( EUserInteraction  interaction,
PrivilegeCallback  cb 
)
static

Requests the local user privilege associated with given interaction.

Parameters
interactionRequested interaction.
callbackCallback object used to obtain result.
Returns
Returns true on successful request placement.

◆ SetMuted()

proto external void SocialComponent.SetMuted ( int  otherPlayerID,
bool  mute 
)

Mutes/unmutes otherPlayer for the duration of the game session.

Only VoiceChat interaction is affected.

◆ Unblock()

proto external bool SocialComponent.Unblock ( BlockListRequestCallback  callback,
int  otherPlayerID 
)

Removes given player from game block list.

Invokes callback when requestt completes.

Returns
false on failure or when player is not blocked throught a game block list.

◆ UpdateBlockList()

static proto void SocialComponent.UpdateBlockList ( )
static

Requests update of block list using BlockListApi.

Invokes OnBlockListUpdate when finished.

Member Data Documentation

◆ m_OnBlockedPlayerJoinedInvoker

ref ScriptInvoker<int> SocialComponent.m_OnBlockedPlayerJoinedInvoker = new ScriptInvoker<int>()

◆ m_OnReportPlayerFinishInvoker

ref ScriptInvoker<int, bool> SocialComponent.m_OnReportPlayerFinishInvoker = new ScriptInvoker<int, bool>()

◆ s_OnBlockListUpdateInvoker

ref ScriptInvoker<bool> SocialComponent.s_OnBlockListUpdateInvoker = new ScriptInvoker<bool>()
static

◆ s_OnCheckedBlockedPlayersInRoomInvoker

ref ScriptInvoker<Room, array<BlockedRoomPlayer> > SocialComponent.s_OnCheckedBlockedPlayersInRoomInvoker = new ScriptInvoker<Room, array<BlockedRoomPlayer>>()
static

The documentation for this interface was generated from the following file: