16 [
Attribute(
"LoadoutList",
desc:
"List for available player's loadouts' buttons")]
50 [
Attribute(
"#AR-Loadout_Free_Supply_Cost")]
55 [
Attribute(
"{39D815C843414C76}UI/layouts/Menus/DeployMenu/LoadoutButton.layout",
desc:
"Layout for loadout button, has to have SCR_LoadoutButton attached to it.")]
99 super.HandlerAttached(w);
105 Print(
"Loadout manager is missing in the world! Deploy menu won't work correctly.",
LogLevel.ERROR);
149 PlayerController pc =
GetGame().GetPlayerController();
182 super.HandlerDeattached(w);
260 array<ref SCR_BasePlayerLoadout> availableLoadouts = {};
262 PlayerController pc =
GetGame().GetPlayerController();
263 SCR_PlayerControllerGroupComponent pcGroupComponent = SCR_PlayerControllerGroupComponent.Cast(pc.FindComponent(SCR_PlayerControllerGroupComponent));
264 if (!pcGroupComponent)
271 SCR_AIGroup group = pcGroupComponent.GetPlayersGroup();
274 m_LoadoutManager.GetPlayerLoadoutsByGroup(group, faction, availableLoadouts);
285 if (!
loadout.IsLoadoutAvailableClient())
294 if (!availableLoadouts.IsEmpty())
298 if (arsenalLoadout && selectedLoadout != arsenalLoadout)
302 else if (!selectedLoadout || !availableLoadouts.Contains(selectedLoadout))
307 if (
loadout.IsLoadoutAvailableClient())
330 if (!playerIds || playerIds.IsEmpty())
333 for (
int i = 0; i < playerIds.Count(); ++i)
335 int pid = playerIds[i];
343 int playerCount = playerIds.Count();
344 int slotCount = group.GetMaxMembers();
346 if (!group.IsMaxMembersLimited())
351 for (
int i = playerCount; i < slotCount; ++i)
364 Widget sibling = child.GetSibling();
365 child.RemoveFromHierarchy();
387 buttonComp.SetEnabled(!
loadout ||
loadout.IsLoadoutAvailableClient());
417 array<ref SCR_BasePlayerLoadout> availableLoadouts = {};
423 loadoutBtn.SetEnabled(
loadout.IsLoadoutAvailableClient());
493 array<ref SCR_BasePlayerLoadout> loadouts = {};
541 SCR_DeployMenuMain deployMenu = SCR_DeployMenuMain.GetDeployMenu();
545 if (spawnPointRequest)
549 spawnPoint = rplComp.GetEntity();
565 if (inputManager && inputManager.GetLastUsedInputDevice() == EInputDeviceType.KEYBOARD)
579 SCR_ArsenalManagerComponent arsenalManager;
582 if (supplyCost < 0 || !SCR_DeployMenuMain.GetDeployMenu() || !SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager) || arsenalManager.GetLoadoutSpawnSupplyCostMultiplier() == 0 || !
SCR_ResourceSystemHelper.IsGlobalResourceTypeEnabled())
640 SCR_ArsenalManagerComponent arsenalManager;
643 if (supplyCost < 0 || !SCR_DeployMenuMain.GetDeployMenu() || !SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager) || arsenalManager.GetLoadoutSpawnSupplyCostMultiplier() == 0 || !
SCR_ResourceSystemHelper.IsGlobalResourceTypeEnabled())
801 super.HandlerAttached(w);
817 super.HandlerDeattached(w);
833 return super.OnFocus(w, x, y);
845 return super.OnFocusLost(w, x, y);
860 string iconPath = entityUIInfo.GetIconPath();
861 if (iconPath.IsEmpty())
862 SetImage(entityUIInfo.GetImageSetPath(), entityUIInfo.GetIconSetName());
888 SCR_AIGroup group = groupManager.GetPlayerGroup(pid);
903 SCR_AIGroup group = groupManager.FindGroup(groupId);
933 super.SetSelected(selected);
ArmaReforgerScripted GetGame()
InputManager GetInputManager()
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_LoadoutManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerWidgetMethod > ScriptInvokerWidget
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
Object holding reference to resource. In destructor release the resource.
Replication item identifier.
bool IsPlayerLeader(int playerID)
static ScriptInvoker GetOnPlayerLeaderChanged()
TextWidget m_wExpandButtonName
ImageWidget m_wExpandButtonIcon
string m_sExpandButtonName
ref array< SCR_DeployButtonBase > m_aButtons
static ScriptInvoker GetOnListCollapse()
void Lock(SCR_DeployButtonBase btn)
Lock this component's buttons from processing any further requests. Unlock() should be called once yo...
string m_sExpandButtonIcon
void OnListExpand(SCR_DeployRequestUIBaseComponent component, bool expanded)
ref ScriptInvoker m_OnButtonFocused
bool IsGroupRolesConfigured()
ResourceName GetFactionBackground()
Component responsible for requesting and visualization of available loadouts in deploy menu.
void ClearLoadoutList()
Removed all buttons from the loadout list.
void RefreshLoadoutPreview()
Refreshes current loadout preview widget.
void RequestPlayerLoadout(SCR_BasePlayerLoadout loadout)
void RegisterOnSpawnPointInvoker(notnull OnSpawnPointRplIdSetInvoker invoker)
void CreateEmptySlot(int order)
Create an empty slot in the loadout grid.
string m_sLoadoutImageName
ref array< string > m_sDayModifierStrings
SCR_LoadoutGallery m_LoadoutSelector
SCR_EditableEntityUIInfo GetUIInfo(SCR_BasePlayerLoadout loadout)
ScriptInvokerInt GetOnPlayerEntryFocused()
Widget m_wSuppliesWrapper
SCR_PlayerFactionAffiliationComponent m_PlyFactionAffilComp
ScriptInvokerWidget GetOnPlayerEntryFocusLost()
void RequestRandomLoadout(Faction faction)
Send a request to assign a random faction loadout.
ImageWidget m_wLoadoutIcon
float GetLoadoutCost(SCR_BasePlayerLoadout loadout=null)
void SetListVisible(bool visible)
SCR_PlayerSupplyAllocationUI m_PlayerSupplyAllocationUI
void ResetPlayerLoadoutPreview()
IEntity m_PreviewedEntity
override void ToggleCollapsed()
SCR_LoadoutPreviewComponent m_PreviewComp
void AddLoadout(SCR_BasePlayerLoadout loadout)
Add a loadout into the loadout selector.
override void SetListWidget(Widget list)
SCR_LoadoutManager m_LoadoutManager
void OnPlayerLoadoutAssigned(SCR_PlayerLoadoutComponent component)
Called from deploy menu when player's loadout is assigned.
void OnGroupChanged(int groupId)
void OnButtonFocused(Widget w)
string m_sWeatherModifier
void OnSpawnPointChanged(RplId id)
void SetSelected(SCR_PlayerLoadoutComponent component)
void ShowAvailableLoadouts(Faction faction)
Show available loadouts in the loadout selector.
Widget m_wLoadoutSelector
RichTextWidget m_wLoadoutNameText
RichTextWidget m_wSuppliesText
void SetLoadoutPreview(SCR_BasePlayerLoadout loadout)
Set a loadout shown in the preview widget.
SCR_ArsenalManagerComponent m_ArsenalManagerComp
SCR_PlayerControllerGroupComponent m_PlayerControllerGroupComponent
const int EXTRA_ROWS_FOR_INFINITE_GROUP
override void HandlerAttached(Widget w)
ResourceName m_sLoadoutImageSet
void OnRequestPlayerLoadout(SCR_LoadoutButton loadoutBtn)
Send a loadout request when clicking on a loadout button.
string m_sLoadoutSelector
void OnLoadoutsChanged(SCR_BasePlayerLoadout loadout, int newCount)
void OnButtonFocusLost(Widget w)
override void HandlerDeattached(Widget w)
override void SetExpanded(bool expanded)
GridLayoutWidget m_wLoadoutList
void OnLoadoutSpawnCostMultiplierChanged(float newMultiplier)
TextWidget m_wLoadoutName
void UpdateLoadouts(int playerID, bool hasValidLoadout)
void ShowLoadoutSelector(bool show)
ResourceName m_sLoadoutButton
ref ScriptInvokerInt m_OnPlayerEntryFocused
void CreatePlayerLoadoutButton(SCR_BasePlayerLoadout loadout, int pid, int order)
const int LOADOUTS_PER_ROW
SCR_BasePlayerLoadout GetPlayerLoadout()
Get local player's assigned loadout.
SCR_PlayerLoadoutComponent m_PlyLoadoutComp
override bool IsExpanded()
void ShowPlayerLoadouts(array< int > playerIds, SCR_AIGroup group=null)
Fill the loadout list with players' loadouts.
string m_sMSARSuppliesName
ref ScriptInvokerWidget m_OnPlayerEntryFocusLost
SCR_BasePlayerLoadout GetLoadout()
int GetCurrentDayTimeUIInfo(out SCR_UIInfo uiInfo)
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
proto external PlayerController GetPlayerController()
proto external int GetPlayerId()