Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
game.c File Reference

Go to the source code of this file.

Enumerations

enum  EGameFlags { Metabolism = 1 , SpawnVehicles = 2 , SpawnAI = 4 , Last = 4 }
 GameMode Game Flags represented by bit mask. More...

Functions

void ~ArmaReforgerScripted ()
IEntity SpawnEntityPrefabEx (ResourceName prefab, bool randomizeEditableVariant, BaseWorld world=null, EntitySpawnParams params=null)
ScriptInvokerVoid GetOnHUDManagerChanged ()
SCR_DataCollectorComponent GetDataCollector ()
SCR_ResourceGrid GetResourceGrid ()
SCR_ResourceSystemSubscriptionManager GetResourceSystemSubscriptionManager ()
void RegisterDataCollector (SCR_DataCollectorComponent instance)
void UnregisterBuildingDestructionManager (notnull SCR_BuildingDestructionManagerComponent manager)
void RegisterBuildingDestructionManager (notnull SCR_BuildingDestructionManagerComponent manager)
SCR_BuildingDestructionManagerComponent GetBuildingDestructionManager ()
SCR_LoadoutManager GetLoadoutManager ()
SCR_SettingsManager GetSettingsManager ()
SCR_ProfaneFilter GetProfanityFilter ()
bool GetHasKeyboard ()
ScriptCallQueue GetCallqueue ()
ScriptInvoker OnUserSettingsChangedInvoker ()
ScriptInvoker OnInputDeviceUserChangedInvoker ()
ScriptInvoker OnInputDeviceIsGamepadInvoker ()
ScriptInvoker OnWorldSimulatePhysicsInvoker ()
ScriptInvoker OnWindowResizeInvoker ()
void OnMissionSet (MissionHeader mission)
override void OnCinematicStart ()
override void OnCinematicEnd ()
override void OnGameInstallComplete ()
override void OnCinematicBlending (float blendFactor, vector cameraPosition)
void OnKickedFromGame (KickCauseCode kickCode)
 Called after player was kicked from game back to main menu, providing reason for the kick.
bool GetFullKickReason (KickCauseCode kickCode, out KickCauseGroup2 groupInt, out int reasonInt, out string group, out string reason)
void AddRejoinAttempt ()
override void OnWorldPostProcess (World world)
override void ShowErrorMessage (string msg)
void ShowNextErrorDialog ()
bool GetGameStarted ()
EGameFlags GetGameFlags ()
void SetGameFlags (EGameFlags newGameFlags, bool shouldInvoke)
bool AreGameFlagsObtained ()
bool AreGameFlagsSet (EGameFlags checkGameFlags)
ScriptInvoker GetOnObtainedGameFlagsInvoker ()
void InvokeGameFlags ()
override GetMenuPreset ()
override LoadingAnim CreateLoadingAnim (WorkspaceWidget workspaceWidget)
override void OnAfterInit (BaseWorld world)
override bool OnGameStart ()
 Gets called after world is initialized but before first ticks.
override void OnGameEnd ()
 Called on all machines when the world ends.
void OnBeforeWorldCleanup ()
override void OnUserSettingsChangedEvent ()
override void OnInputDeviceUserChangedEvent (EInputDeviceType oldDevice, EInputDeviceType newDevice)
override void OnInputDeviceIsGamepadEvent (bool isGamepad)
override void OnWorldSimulatePhysics (float timeSlice)
override event void OnWindowResize (int w, int h, bool windowed)
void AddActionListeners ()
void RemoveActionListeners ()
override void OnUpdate (BaseWorld world, float timeslice)
void SetHUDManager (SCR_HUDManagerComponent hud)
void RegisterLoadoutManager (SCR_LoadoutManager instance)
void UnregisterLoadoutManager (SCR_LoadoutManager instance)
SCR_HUDManagerComponent GetHUDManager ()
ref Managed GetPlayerDataStats (int playerID)
ref Managed GetSessionDataStats ()
override string GetMissionName ()
override void PlayGameConfig (ResourceName sResource, string addonsList)
override void HostGameConfig ()
override Managed ReadGameConfig (string sResource)
override array< ResourceNameGetDefaultGameConfigs ()
void InsertNewScenario (ResourceName scenario, inout array< ResourceName > resources)
bool IsPlatformGameConsole ()
override void OnGamepadConnectionStatus (bool isConnected)
override void OnUserSignedOut ()
Game CreateGame ()
ArmaReforgerScripted GetGame ()

Variables

enum EGameFlags CONFIG_CORES_PATH = "Configs/Core/"
 Enum of DiagMenu id values, generated by Game.
EGameFlags m_eGameFlags
 Game Flags specific for current game mode, or for the game mode which is going to be played when it is a host/server side.
bool m_bAreGameFlagsObtained
ref ScriptInvoker Event_OnObtainedGameFlags = new ScriptInvoker()
SCR_HUDManagerComponent m_HUDManager
ScriptedChatEntity m_ChatEntity
ref SCR_GameCoresManager m_CoresManager
ref SCR_SettingsManager m_SettingsManager
ref SCR_ProfaneFilter m_ProfanityFilter
SCR_BuildingDestructionManagerComponent m_BuildingDestructionManager
SCR_SpawnerAIGroupManagerComponent m_SpawnerAIGroupManager
bool m_bHasKeyboard
SCR_LoadoutManager m_pLoadoutManager
 Object responsible for managing and providing game modes with list of available loadouts.
SCR_DataCollectorComponent m_DataCollectorComponent
 Object responsible for tracking and connecting to the database for Career Profile.
ref ScriptInvoker m_OnMissionSetInvoker = new ScriptInvoker()
ref RplSessionErrorHandler m_SessionErrorHandler
bool m_bIsMainMenuOpen = false
ref SCR_Stack< SCR_GameErrorMessagem_aErrorStack = new SCR_Stack<SCR_GameErrorMessage>()
 Stack of queued error messages. All messages are popped one by one as user closes them and only in the main menu.
ref ScriptInvoker m_OnChangeUserSettingsInvoker = new ScriptInvoker()
ref ScriptInvoker m_OnInputDeviceUserChangedInvoker = new ScriptInvoker()
ref ScriptInvoker m_OnInputDeviceIsGamepadInvoker = new ScriptInvoker()
ref ScriptInvoker m_OnWorldSimulatePhysicsInvoker = new ScriptInvoker()
ref ScriptInvoker< int, int, boolm_OnWindowResizeInvoker = new ScriptInvoker()
ref ScriptInvokerVoid m_OnHUDManagerChanged = new ScriptInvokerVoid()
ref ScriptInvoker< boolm_OnGameInstallComplete = new ScriptInvoker()
ref ScriptCallQueue m_Callqueue = new ScriptCallQueue()
ref SCR_ResourceGrid m_ResourceGrid
ref SCR_ResourceSystemSubscriptionManager m_ResourceSystemSubscriptionManager
ArmaReforgerScripted g_ARGame

Enumeration Type Documentation

◆ EGameFlags

enum EGameFlags

GameMode Game Flags represented by bit mask.

Enumerator
Metabolism 
SpawnVehicles 
SpawnAI 
Last 

Definition at line 16 of file game.c.

Function Documentation

◆ AddActionListeners()

void AddActionListeners ( )
protected

Definition at line 804 of file game.c.

◆ AddRejoinAttempt()

void AddRejoinAttempt ( )
protected

Definition at line 407 of file game.c.

◆ AreGameFlagsObtained()

bool AreGameFlagsObtained ( )
protected

You should normally register to GetOnObtainedGameFlagsInvoker() but this is available for cases where registration is not possible.

See also
GetOnObtainedGameFlagsInvoker()
Returns

Definition at line 508 of file game.c.

◆ AreGameFlagsSet()

bool AreGameFlagsSet ( EGameFlags checkGameFlags)
protected

Can check for multiple bits at the same time.

Parameters
[in]checkGameFlags
Returns

Definition at line 517 of file game.c.

◆ CreateGame()

Game CreateGame ( )
protected

Definition at line 1391 of file game.c.

◆ CreateLoadingAnim()

override LoadingAnim CreateLoadingAnim ( WorkspaceWidget workspaceWidget)
protected

Definition at line 544 of file game.c.

◆ GetBuildingDestructionManager()

SCR_BuildingDestructionManagerComponent GetBuildingDestructionManager ( )
protected
Returns

Definition at line 175 of file game.c.

◆ GetCallqueue()

ScriptCallQueue GetCallqueue ( )
protected
Returns

Definition at line 217 of file game.c.

◆ GetDataCollector()

SCR_DataCollectorComponent GetDataCollector ( )
protected
Returns

Definition at line 110 of file game.c.

◆ GetDefaultGameConfigs()

override array< ResourceName > GetDefaultGameConfigs ( )
protected

Get a list of all missions, featured, tutorial, recommended ones

Returns
mission resources list

Definition at line 1259 of file game.c.

◆ GetFullKickReason()

bool GetFullKickReason ( KickCauseCode kickCode,
out KickCauseGroup2 groupInt,
out int reasonInt,
out string group,
out string reason )
protected

Convert KickCauseCode into proper kick reason variables

Parameters
[in]kickCodeKick code to convert
[out]groupInt
[out]reasonInt
[out]group
[out]reason
Returns
Will return true if proper kick reason found

Definition at line 354 of file game.c.

◆ GetGame()

◆ GetGameFlags()

EGameFlags GetGameFlags ( )
protected
Returns

Definition at line 484 of file game.c.

◆ GetGameStarted()

bool GetGameStarted ( )
protected
Returns

Definition at line 477 of file game.c.

◆ GetHasKeyboard()

bool GetHasKeyboard ( )
protected
Returns

Definition at line 210 of file game.c.

◆ GetHUDManager()

SCR_HUDManagerComponent GetHUDManager ( )
protected
Returns

Definition at line 1151 of file game.c.

◆ GetLoadoutManager()

SCR_LoadoutManager GetLoadoutManager ( )
protected

Returns currently registered SCR_LoadoutManager if any is present.

Returns
Reference to loadout manager or null if none.

Definition at line 183 of file game.c.

◆ GetMenuPreset()

override GetMenuPreset ( )
protected

Important for menu manager to work. Specify presets in ChimeraMenuPreset enum and add them in chimeraMenus.conf configuration file.

Returns
ChimeraMenuPreset typename

Definition at line 538 of file game.c.

◆ GetMissionName()

override string GetMissionName ( )
protected

Definition at line 1211 of file game.c.

◆ GetOnHUDManagerChanged()

ScriptInvokerVoid GetOnHUDManagerChanged ( )
protected

Definition at line 103 of file game.c.

◆ GetOnObtainedGameFlagsInvoker()

ScriptInvoker GetOnObtainedGameFlagsInvoker ( )
protected
Returns

Definition at line 524 of file game.c.

◆ GetPlayerDataStats()

ref Managed GetPlayerDataStats ( int playerID)
protected

Definition at line 1193 of file game.c.

◆ GetProfanityFilter()

SCR_ProfaneFilter GetProfanityFilter ( )
protected
Returns

Definition at line 200 of file game.c.

◆ GetResourceGrid()

SCR_ResourceGrid GetResourceGrid ( )
protected
Returns

Definition at line 117 of file game.c.

◆ GetResourceSystemSubscriptionManager()

SCR_ResourceSystemSubscriptionManager GetResourceSystemSubscriptionManager ( )
protected
Returns

Definition at line 127 of file game.c.

◆ GetSessionDataStats()

ref Managed GetSessionDataStats ( )
protected

Definition at line 1202 of file game.c.

◆ GetSettingsManager()

SCR_SettingsManager GetSettingsManager ( )
protected
Returns

Definition at line 190 of file game.c.

◆ HostGameConfig()

override void HostGameConfig ( )
protected

Definition at line 1238 of file game.c.

◆ InsertNewScenario()

void InsertNewScenario ( ResourceName scenario,
inout array< ResourceName > resources )
protected

Check that scenario isn't in list when adding new scenario

Parameters
[in]scenario
[in,out]resources

Definition at line 1281 of file game.c.

◆ InvokeGameFlags()

void InvokeGameFlags ( )
protected

Definition at line 530 of file game.c.

◆ IsPlatformGameConsole()

bool IsPlatformGameConsole ( )
protected
Returns
true if current client platform is console

Definition at line 1357 of file game.c.

◆ OnAfterInit()

override void OnAfterInit ( BaseWorld world)
protected

Called after full initialization of Game instance

Parameters
[in]world

Definition at line 552 of file game.c.

◆ OnBeforeWorldCleanup()

void OnBeforeWorldCleanup ( )
protected

Definition at line 761 of file game.c.

◆ OnCinematicBlending()

override void OnCinematicBlending ( float blendFactor,
vector cameraPosition )
protected

Definition at line 294 of file game.c.

◆ OnCinematicEnd()

override void OnCinematicEnd ( )
protected

Definition at line 282 of file game.c.

◆ OnCinematicStart()

override void OnCinematicStart ( )
protected

Definition at line 276 of file game.c.

◆ OnGameEnd()

override void OnGameEnd ( )
protected

Called on all machines when the world ends.

Definition at line 745 of file game.c.

◆ OnGameInstallComplete()

override void OnGameInstallComplete ( )
protected

Definition at line 288 of file game.c.

◆ OnGamepadConnectionStatus()

override void OnGamepadConnectionStatus ( bool isConnected)
protected

Open gamepad disconnected warning dialog

Parameters
[in]isConnectedis false on disconnection, true on re-connection.

Definition at line 1369 of file game.c.

◆ OnInputDeviceIsGamepadEvent()

override void OnInputDeviceIsGamepadEvent ( bool isGamepad)
protected

Definition at line 783 of file game.c.

◆ OnInputDeviceIsGamepadInvoker()

ScriptInvoker OnInputDeviceIsGamepadInvoker ( )
protected
Returns

Definition at line 238 of file game.c.

◆ OnInputDeviceUserChangedEvent()

override void OnInputDeviceUserChangedEvent ( EInputDeviceType oldDevice,
EInputDeviceType newDevice )
protected

Event which is called when input device binded to user changed.

Parameters
[in]oldDevice
[in]newDevice

Definition at line 777 of file game.c.

◆ OnInputDeviceUserChangedInvoker()

ScriptInvoker OnInputDeviceUserChangedInvoker ( )
protected
Returns

Definition at line 231 of file game.c.

◆ OnKickedFromGame()

void OnKickedFromGame ( KickCauseCode kickCode)
protected

Called after player was kicked from game back to main menu, providing reason for the kick.

Definition at line 310 of file game.c.

◆ OnMissionSet()

void OnMissionSet ( MissionHeader mission)
protected

Definition at line 258 of file game.c.

◆ OnUpdate()

override void OnUpdate ( BaseWorld world,
float timeslice )
protected

Definition at line 868 of file game.c.

◆ OnUserSettingsChangedEvent()

override void OnUserSettingsChangedEvent ( )
protected

Definition at line 768 of file game.c.

◆ OnUserSettingsChangedInvoker()

ScriptInvoker OnUserSettingsChangedInvoker ( )
protected
Returns

Definition at line 224 of file game.c.

◆ OnUserSignedOut()

override void OnUserSignedOut ( )
protected

Definition at line 1382 of file game.c.

◆ OnWindowResize()

override event void OnWindowResize ( int w,
int h,
bool windowed )
protected

Definition at line 797 of file game.c.

◆ OnWindowResizeInvoker()

ScriptInvoker OnWindowResizeInvoker ( )
protected
Returns

Definition at line 252 of file game.c.

◆ OnWorldPostProcess()

override void OnWorldPostProcess ( World world)
protected

Called once loading of all entities of the world have been finished (still within the loading)

Parameters
[in]worldLoaded world

Definition at line 429 of file game.c.

◆ OnWorldSimulatePhysics()

override void OnWorldSimulatePhysics ( float timeSlice)
protected

Definition at line 791 of file game.c.

◆ OnWorldSimulatePhysicsInvoker()

ScriptInvoker OnWorldSimulatePhysicsInvoker ( )
protected
Returns

Definition at line 245 of file game.c.

◆ PlayGameConfig()

override void PlayGameConfig ( ResourceName sResource,
string addonsList )
protected

Definition at line 1221 of file game.c.

◆ ReadGameConfig()

override Managed ReadGameConfig ( string sResource)
protected
Parameters
[in]sResource

Definition at line 1251 of file game.c.

◆ RegisterBuildingDestructionManager()

void RegisterBuildingDestructionManager ( notnull SCR_BuildingDestructionManagerComponent manager)
protected
Parameters
[in]manager

Definition at line 162 of file game.c.

◆ RegisterDataCollector()

void RegisterDataCollector ( SCR_DataCollectorComponent instance)
protected
Parameters
[in]instance

Definition at line 138 of file game.c.

◆ RegisterLoadoutManager()

void RegisterLoadoutManager ( SCR_LoadoutManager instance)
protected

Registers provided loadout manager as the one used by the game. Multiple registrations are not supported and will log an error.

Parameters
[in]instanceInstance to register.

Definition at line 1093 of file game.c.

◆ RemoveActionListeners()

void RemoveActionListeners ( )
protected

Definition at line 818 of file game.c.

◆ SetGameFlags()

void SetGameFlags ( EGameFlags newGameFlags,
bool shouldInvoke )
protected
Parameters
[in]newGameFlags
[in]shouldInvoke

Definition at line 492 of file game.c.

◆ SetHUDManager()

void SetHUDManager ( SCR_HUDManagerComponent hud)
protected
Parameters
[in]hud

Definition at line 1079 of file game.c.

◆ ShowErrorMessage()

override void ShowErrorMessage ( string msg)
protected

Push an error message to the error message stack

Parameters
[in]msg

Definition at line 441 of file game.c.

◆ ShowNextErrorDialog()

void ShowNextErrorDialog ( )
protected

If no error dialogue is currently shown try to pop it from the error stack and display it as an error dialogue

Definition at line 449 of file game.c.

◆ SpawnEntityPrefabEx()

IEntity SpawnEntityPrefabEx ( ResourceName prefab,
bool randomizeEditableVariant,
BaseWorld world = null,
EntitySpawnParams params = null )
protected

Spawn entity or potential entity variant

Parameters
[in]prefabEntity prefab to spawn
[in]randomizeEditableVariantIf true and the entity has the SCR_EditableEntityComponent, then it will try and get a random variant if it has any assigned (More performance heavy)
[in]world
[in]paramsEntity spawn params
Returns
Spawned Entity

Definition at line 90 of file game.c.

◆ UnregisterBuildingDestructionManager()

void UnregisterBuildingDestructionManager ( notnull SCR_BuildingDestructionManagerComponent manager)
protected
Parameters
[in]manager

Definition at line 152 of file game.c.

◆ UnregisterLoadoutManager()

void UnregisterLoadoutManager ( SCR_LoadoutManager instance)
protected

Unregisters provided loadout manager. Wrong unregistrations will log an error.

Parameters
[in]instanceInstance to unregister.

Definition at line 1120 of file game.c.

◆ ~ArmaReforgerScripted()

void ~ArmaReforgerScripted ( )
protected

Definition at line 78 of file game.c.

Variable Documentation

◆ CONFIG_CORES_PATH

enum EGameFlags CONFIG_CORES_PATH = "Configs/Core/"

Enum of DiagMenu id values, generated by Game.

Main game instance. Created when the game starts (not when a world starts!) and persists until the game is closed.

◆ Event_OnObtainedGameFlags

ref ScriptInvoker Event_OnObtainedGameFlags = new ScriptInvoker()
protected

Definition at line 38 of file game.c.

◆ g_ARGame

ArmaReforgerScripted g_ARGame
protected

Definition at line 1388 of file game.c.

◆ m_aErrorStack

ref SCR_Stack<SCR_GameErrorMessage> m_aErrorStack = new SCR_Stack<SCR_GameErrorMessage>()
protected

Stack of queued error messages. All messages are popped one by one as user closes them and only in the main menu.

Definition at line 61 of file game.c.

◆ m_bAreGameFlagsObtained

bool m_bAreGameFlagsObtained
protected

Definition at line 37 of file game.c.

◆ m_bHasKeyboard

bool m_bHasKeyboard
protected

Definition at line 46 of file game.c.

◆ m_bIsMainMenuOpen

bool m_bIsMainMenuOpen = false
protected

Definition at line 57 of file game.c.

◆ m_BuildingDestructionManager

SCR_BuildingDestructionManagerComponent m_BuildingDestructionManager
protected

Definition at line 44 of file game.c.

◆ m_Callqueue

ref ScriptCallQueue m_Callqueue = new ScriptCallQueue()
protected

Definition at line 71 of file game.c.

◆ m_ChatEntity

ScriptedChatEntity m_ChatEntity
protected

Definition at line 40 of file game.c.

◆ m_CoresManager

ref SCR_GameCoresManager m_CoresManager
protected

Definition at line 41 of file game.c.

◆ m_DataCollectorComponent

SCR_DataCollectorComponent m_DataCollectorComponent
protected

Object responsible for tracking and connecting to the database for Career Profile.

Definition at line 52 of file game.c.

◆ m_eGameFlags

EGameFlags m_eGameFlags
protected

Game Flags specific for current game mode, or for the game mode which is going to be played when it is a host/server side.

Definition at line 36 of file game.c.

◆ m_HUDManager

SCR_HUDManagerComponent m_HUDManager
protected

Definition at line 39 of file game.c.

◆ m_OnChangeUserSettingsInvoker

ref ScriptInvoker m_OnChangeUserSettingsInvoker = new ScriptInvoker()
protected

Definition at line 63 of file game.c.

◆ m_OnGameInstallComplete

ref ScriptInvoker<bool> m_OnGameInstallComplete = new ScriptInvoker()
protected

Definition at line 69 of file game.c.

◆ m_OnHUDManagerChanged

ref ScriptInvokerVoid m_OnHUDManagerChanged = new ScriptInvokerVoid()
protected

Definition at line 68 of file game.c.

◆ m_OnInputDeviceIsGamepadInvoker

ref ScriptInvoker m_OnInputDeviceIsGamepadInvoker = new ScriptInvoker()
protected

Definition at line 65 of file game.c.

◆ m_OnInputDeviceUserChangedInvoker

ref ScriptInvoker m_OnInputDeviceUserChangedInvoker = new ScriptInvoker()
protected

Definition at line 64 of file game.c.

◆ m_OnMissionSetInvoker

ref ScriptInvoker m_OnMissionSetInvoker = new ScriptInvoker()
protected

Definition at line 54 of file game.c.

◆ m_OnWindowResizeInvoker

ref ScriptInvoker<int, int, bool> m_OnWindowResizeInvoker = new ScriptInvoker()
protected

Definition at line 67 of file game.c.

◆ m_OnWorldSimulatePhysicsInvoker

ref ScriptInvoker m_OnWorldSimulatePhysicsInvoker = new ScriptInvoker()
protected

Definition at line 66 of file game.c.

◆ m_pLoadoutManager

SCR_LoadoutManager m_pLoadoutManager
protected

Object responsible for managing and providing game modes with list of available loadouts.

Definition at line 49 of file game.c.

◆ m_ProfanityFilter

ref SCR_ProfaneFilter m_ProfanityFilter
protected

Definition at line 43 of file game.c.

◆ m_ResourceGrid

ref SCR_ResourceGrid m_ResourceGrid
protected

Definition at line 73 of file game.c.

◆ m_ResourceSystemSubscriptionManager

ref SCR_ResourceSystemSubscriptionManager m_ResourceSystemSubscriptionManager
protected

Definition at line 74 of file game.c.

◆ m_SessionErrorHandler

ref RplSessionErrorHandler m_SessionErrorHandler
protected

Definition at line 55 of file game.c.

◆ m_SettingsManager

ref SCR_SettingsManager m_SettingsManager
protected

Definition at line 42 of file game.c.

◆ m_SpawnerAIGroupManager

SCR_SpawnerAIGroupManagerComponent m_SpawnerAIGroupManager
protected

Definition at line 45 of file game.c.