Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LoadSessionToolbarAction.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 override bool IsServer()
6 {
7 //--- The action opens local UI
8 return false;
9 }
10
11 //------------------------------------------------------------------------------------------------
12 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
13 {
14 //--- Disallow if no saving is configured for current scenario
15 if (!GetGame().GetSaveGameManager().IsSavingEnabled())
16 return false;
17
18 //--- Loading is always available for the host and in singleplayer
19 if (Replication.IsServer())
20 return true;
21
22 //--- Loading is available only if the game is not hosted (the host has exclusive access to that feature, nobody should do it without their knowledge)
24 return gameMode && !gameMode.IsHosted();
25 }
26
27 //------------------------------------------------------------------------------------------------
28 override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
29 {
30 return CanBeShown(hoveredEntity, selectedEntities, cursorWorldPosition, flags);
31 }
32
33 //------------------------------------------------------------------------------------------------
34 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags, int param = -1)
35 {
36 GetGame().GetMenuManager().OpenDialog(ChimeraMenuPreset.EditorLoadDialog);
37 }
38}
SCR_EAIThreatSectorFlags flags
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
SCR_BaseGameMode GetGameMode()
Main replication API.
Definition Replication.c:14