Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EndGameToolbarAction.c
Go to the documentation of this file.
3{
4 override bool IsServer()
5 {
6 return false;
7 }
8
9 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
10 {
11 if (!Replication.IsRunning())
12 return false;
13
14 SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
15 if (!editorManager)
16 return false;
17
18 SCR_RespawnComponent respawnComponent = SCR_RespawnComponent.GetInstance();
19 if (!respawnComponent)
20 return false;
21
23
24 if (gameMode.GetState() != SCR_EGameModeState.GAME)
25 return false;
26
27 return !editorManager.IsLimited();
28 }
29 override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
30 {
31 if (!Replication.IsRunning())
32 return false;
33
35 if (gameMode.GetState() != SCR_EGameModeState.GAME)
36 return false;
37
38 return true;
39 }
40 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags, int param = -1)
41 {
43 int PlayerID = -1;
44
45 if (playerController)
46 PlayerID = playerController.GetPlayerId();
47
48 SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
49 if (!editorManager)
50 return;
51
52 if (editorManager.IsLimited())
53 return;
54
55 SCR_RespawnComponent respawnComponent = SCR_RespawnComponent.GetInstance();
56 if (!respawnComponent)
57 return;
58
59 SCR_AttributesManagerEditorComponent attributeManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
60 if (!attributeManager)
61 return;
62
64 if (gameMode.GetState() != SCR_EGameModeState.GAME)
65 return;
66
67 attributeManager.StartEditing(respawnComponent);
68 }
69};
SCR_EAIThreatSectorFlags flags
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()
SCR_EGameModeState
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Main replication API.
Definition Replication.c:14
SCR_EGameModeState GetState()
proto external PlayerController GetPlayerController()