![]() |
Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
|
Go to the source code of this file.
Data Structures | |
| class | SCR_LoadoutManagerClass |
Variables | |
| SCR_LoadoutManagerClass | INVALID_LOADOUT_INDEX = -1 |
| protected ref array< ref SCR_BasePlayerLoadout > | m_aPlayerLoadouts |
| protected ref array< ref SCR_PlayerLoadoutInfo > | m_aPlayerLoadoutInfo = {} |
| List of all player loadout infos in no particular order. Maintained by the authority. More... | |
| protected ref map< int, int > | m_PreviousPlayerLoadouts = new map<int, int>() |
| Map of previous player <playerId : loadoutIndex>. More... | |
| protected ref set< int > | m_ChangedLoadouts = new set<int>() |
| List of indices of loadouts whose count has changed since last update. More... | |
| protected ref map< int, ref SCR_PlayerLoadoutInfo > | m_MappedPlayerLoadoutInfo = new map<int, ref SCR_PlayerLoadoutInfo>() |
| Local mapping of playerId to player loadout info. More... | |
| protected ref map< int, int > | m_PlayerCount = new map<int, int>() |
| Mapping of loadout id:player count. More... | |
| protected ref ScriptInvoker< SCR_BasePlayerLoadout, int > | m_OnMappedPlayerLoadoutInfoChanged |
| bool CanAssignLoadout_S | ( | SCR_PlayerLoadoutComponent | playerLoadoutComponent, |
| SCR_BasePlayerLoadout | loadout | ||
| ) |
Authority: Return whether provided loadout can be set for the requesting player. Game logic can be implemented here, e.g. maximum slots.
| [in] | playerLoadoutComponent | |
| [in] | loadout |
Definition at line 278 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetLoadoutByIndex | ( | int | index | ) |
Returns loadout at provided index or null if none.
| [in] | index |
Definition at line 318 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetLoadoutByName | ( | string | name | ) |
Returns the first loadout with the provided name, or null if none were found.
| [in] | name |
Definition at line 330 of file SCR_LoadoutManager.c.
| int GetLoadoutCount | ( | ) |
Returns the number of loadouts provided by this manager or 0 if none.
Definition at line 292 of file SCR_LoadoutManager.c.
| int GetLoadoutIndex | ( | SCR_BasePlayerLoadout | loadout | ) |
Returns index of provided loadout or -1 if none.
| [in] | loadout |
Definition at line 303 of file SCR_LoadoutManager.c.
| int GetLoadoutPlayerCount | ( | SCR_BasePlayerLoadout | loadout | ) |
Returns current count of players assigned to the provided loadout.
| [in] | loadout |
Definition at line 86 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetLocalPlayerLoadout | ( | ) |
Return loadout of of local player.
| Exception | if no SCR_LoadoutManager is present in the world. |
Definition at line 64 of file SCR_LoadoutManager.c.
| ScriptInvoker GetOnMappedPlayerLoadoutInfoChanged | ( | ) |
Definition at line 464 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetPlayerLoadout | ( | int | playerId | ) |
Return assigned loadout of provided player by their id.
| [in] | playerId | Id of target player corresponding to PlayerController/PlayerManager player id. |
Definition at line 35 of file SCR_LoadoutManager.c.
| array<ref SCR_BasePlayerLoadout> GetPlayerLoadouts | ( | ) |
Definition at line 285 of file SCR_LoadoutManager.c.
| int GetPlayerLoadouts | ( | out notnull array< SCR_BasePlayerLoadout > | outLoadouts | ) |
| int GetPlayerLoadoutsByFaction | ( | Faction | faction, |
| out notnull array< ref SCR_BasePlayerLoadout > | outLoadouts | ||
| ) |
| [in] | faction | |
| [out] | outLoadouts |
Definition at line 360 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetRandomFactionLoadout | ( | Faction | faction | ) |
Returns random loadout that belongs to provided faction or null if none.
| [in] | faction |
Definition at line 347 of file SCR_LoadoutManager.c.
| SCR_BasePlayerLoadout GetRandomLoadout | ( | ) |
Definition at line 453 of file SCR_LoadoutManager.c.
| int GetRandomLoadoutIndex | ( | ) |
Definition at line 439 of file SCR_LoadoutManager.c.
| protected void OnPlayerLoadoutCountChanged | ( | SCR_BasePlayerLoadout | loadout, |
| int | newCount | ||
| ) |
Anyone: Event raised when provided faction's player count changes.
Note: Order of changes is not fully deterministic, e.g. when changing faction from A to B, this method might be invoked in the order B, A instead.
| [in] | loadout | The loadout for which affiliated player count changed. |
| [in] | newCount | The new number of players that are using this loadout. |
Definition at line 176 of file SCR_LoadoutManager.c.
| protected void OnPlayerLoadoutInfoChanged | ( | ) |
Update local player loadout mapping.
Definition at line 111 of file SCR_LoadoutManager.c.
| protected void OnPlayerLoadoutSet_S | ( | SCR_PlayerLoadoutComponent | playerComponent, |
| SCR_BasePlayerLoadout | loadout | ||
| ) |
Authority: Event raised when provided player component has a loadout set.
Definition at line 191 of file SCR_LoadoutManager.c.
| void SCR_LoadoutManager | ( | IEntitySource | src, |
| IEntity | parent | ||
| ) |
| [in] | src | |
| [in] | parent |
Definition at line 500 of file SCR_LoadoutManager.c.
| void UpdatePlayerLoadout_S | ( | SCR_PlayerLoadoutComponent | playerLoadoutComponent | ) |
Authority: Update player loadout info for target player with their up-to-date state.
| [in] | playerLoadoutComponent |
Definition at line 202 of file SCR_LoadoutManager.c.
| void ~SCR_LoadoutManager | ( | ) |
destructor
Definition at line 511 of file SCR_LoadoutManager.c.
| SCR_LoadoutManagerClass INVALID_LOADOUT_INDEX = -1 |
| protected ref array<ref SCR_PlayerLoadoutInfo> m_aPlayerLoadoutInfo = {} |
List of all player loadout infos in no particular order. Maintained by the authority.
Definition at line 15 of file SCR_LoadoutManager.c.
| protected ref array<ref SCR_BasePlayerLoadout> m_aPlayerLoadouts |
Definition at line 11 of file SCR_LoadoutManager.c.
List of indices of loadouts whose count has changed since last update.
Definition at line 21 of file SCR_LoadoutManager.c.
| protected ref map<int, ref SCR_PlayerLoadoutInfo> m_MappedPlayerLoadoutInfo = new map<int, ref SCR_PlayerLoadoutInfo>() |
Local mapping of playerId to player loadout info.
Definition at line 24 of file SCR_LoadoutManager.c.
| protected ref ScriptInvoker<SCR_BasePlayerLoadout, int> m_OnMappedPlayerLoadoutInfoChanged |
Definition at line 29 of file SCR_LoadoutManager.c.
Mapping of loadout id:player count.
Definition at line 27 of file SCR_LoadoutManager.c.