175 SCR_EntityCatalogManagerComponent entityCatalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
176 if (!entityCatalogManager)
187 ResourceName loadoutResource = playerLoadout.GetLoadoutResource();
188 if (!loadoutResource)
203 cost =
data.GetSupplyCost();
243 Debug.Error(
"Map entity is missing in the world! Deploy menu won't work correctly.");
266 Print(
"Cannot find faction manager, respawn menu functionality will be broken.",
LogLevel.ERROR);
273 PlayerController pc =
GetGame().GetPlayerController();
279 Print(
"Cannot find player faction affiliation component!",
LogLevel.ERROR);
285 Print(
"Cannot find player loadout component!",
LogLevel.ERROR);
289 m_PlayerMenuHandler = SCR_PlayerDeployMenuHandlerComponent.Cast(pc.FindComponent(SCR_PlayerDeployMenuHandlerComponent));
304 if (groupsManager && groupsManager.IsGroupMenuAllowed())
328 fade.SetVisible(
true);
347 GetGame().GetInputManager().RemoveActionListener(
"ShowScoreboard",
EActionTrigger.DOWN, OpenPlayerList);
353 super.OnMenuFocusLost();
361 editorManager.AutoInit();
363 GetGame().GetInputManager().AddActionListener(
"ShowScoreboard",
EActionTrigger.DOWN, OpenPlayerList);
369 super.OnMenuFocusGained();
389 super.OnMenuOpened();
421 GetGame().GetInputManager().ActivateContext(
"DeployMenuContext");
422 GetGame().GetInputManager().ActivateContext(
"DeployMenuMapContext");
425 GetGame().GetInputManager().ActivateContext(
"MapContext");
434 m_ChatPanel.OnUpdateChat(tDelta);
451 int remainingTime = -1;
456 float spawnPointTime = 0;
461 if (remainingTime > 0)
526 if (!spawnPointResultInfo)
546 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(spawnPoint);
548 if (resourceComponent)
552 IEntity parentEntity = spawnPoint.GetParent();
556 resourceComponent = SCR_ResourceComponent.FindResourceComponent(parentEntity);
558 if (resourceComponent)
570 if (remainingTime > 0)
597 Print(
"Failed to find SCR_LoadoutRequestUIComponent!",
LogLevel.ERROR);
607 Print(
"Failed to find SCR_GroupRequestUIComponent!",
LogLevel.ERROR);
613 Print(
"Failed to find SCR_SpawnPointRequestUIComponent!",
LogLevel.ERROR);
654 const int timeBeforeFade = 1000;
655 const float fadeTime = 0.3;
675 SCR_MapConfigComponent configComp = SCR_MapConfigComponent.Cast(
m_GameMode.FindComponent(SCR_MapConfigComponent));
736 if (spawnPoint.IsSpawnPointRandom())
742 vector o = spawnPoint.GetOrigin();
769 Debug.Error(
"Selected SpawnPointId is invalid!");
778 Debug.Error(
"No player loadout assigned!");
832 if (!assignedFaction)
856 if (!m_ChatPanel || m_ChatPanel.IsOpen())
870 pauseMenu.FadeBackground(
true,
true);
871 pauseMenu.DisableSettings();
903 int remainingTime = -1;
908 bool hasGroup =
true;
917 if (!groupManager || !groupManager.IsGroupMenuAllowed())
925 static SCR_DeployMenuMain OpenDeployMenu()
927 GetGame().GetMenuManager().CloseAllMenus();
928 if (!GetDeployMenu())
931 return GetDeployMenu();
936 static void CloseDeployMenu()
943 static SCR_DeployMenuMain GetDeployMenu()
1006 super.HandlerAttached(w);
1052 void SetText(
bool deployEnabled,
string text,
float remainingTime = -1)
1058 m_wShortcut.SetVisible(deployEnabled && remainingTime <= 0);
1060 if (!text.IsEmpty())
1062 if (remainingTime >= 0)
1065 m_wText.SetTextFormat(text, respawnTime);
1080 if (remainingTime >= 0)
1083 m_wText.SetTextFormat(
"ERROR %1", respawnTime);
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
void OnMapOpen(MapConfiguration config)
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Get all prefabs that have the spawner data
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
EMapEntityMode
Mode of the map.
SCR_MapEntity m_MapEntity
SCR_FactionManager m_FactionManager
SCR_PlayerDeployMenuHandlerComponentClass m_RespawnComponent
Component responsible for deploy menu management.
ScriptInvokerBase< OnDeployMenuOpenDelegate > OnDeployMenuOpenInvoker
void RequestRespawn()
Sends a respawn request based on assigned loadout and selected spawn point.
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_RespawnTimerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
proto native bool IsOpen()
static ref ScriptInvoker m_onExitLoadingScreen
Object holding reference to resource. In destructor release the resource.
Replication item identifier.
bool PauseGame(bool pause, SCR_EPauseReason reason=SCR_EPauseReason.SYSTEM)
SCR_UIInfoSpawnRequestResult GetUIInfo()
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
void ToggleChatPanel(notnull SCR_ChatPanel panel)
Toggles the chat panel: opens if it's closed, closes if it's open.
Get prefab entity Data of type Ignores disabled Data s param dataType class of Data type you with to obtain return Entity Data of given type Null if not found *SCR_BaseEntityCatalogData GetEntityDataOfType(typename dataType)
Component responsible for handling group requests and visualization in deploy menu.
Component responsible for requesting and visualization of available loadouts in deploy menu.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
SCR_BasePlayerLoadout GetLoadout()
Spawn point entity defines positions on which players can possibly spawn.
static SCR_SpawnPoint GetSpawnPointByRplId(RplId id)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
void RequestRespawn()
Sends a respawn request based on assigned loadout and selected spawn point.
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.