7 [
Attribute(
"0",
desc:
"Type of display data an arsenal item needs in in order to be displayed on this arsenal display", uiwidget:
UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EArsenalItemDisplayType),
category:
"Display settings")]
8 protected EArsenalItemDisplayType m_eArsenalItemDisplayType;
10 [
Attribute(
"4",
desc:
"Refresh time in seconds. Every x time the arsenal will try to refresh")]
13 protected ref array<SCR_WeaponRackSlotEntity>
m_aSlots = {};
19 super.SetSupportedArsenalItemTypes(types);
26 super.SetSupportedArsenalItemModes(modes);
32 if (!slot ||
m_aSlots.Find(slot) != -1)
58 for (
int i = 0; i <
m_aSlots.Count(); i++)
74 array<SCR_ArsenalItem> filteredArsenalItems = {};
80 int availableItemCount = filteredArsenalItems.Count();
81 int availableSlotCount =
m_aSlots.Count();
85 for (
int i = 0; i < availableSlotCount; i++)
92 else if(currentSlot && currentSlot.GetChildren())
96 else if (!currentSlot)
108 int index = i % availableItemCount;
109 for (
int j = 0; j < availableItemCount; j++)
111 itemToSpawn = filteredArsenalItems[
index];
117 if (
index >= availableItemCount)
134 if (slotEntity.GetChildren() && slotEntity.GetChildren().GetPrefabData())
146 return GetItemValid(itemType, itemMode) &&
SCR_Enum.HasPartialFlag(supportedSlotTypes, itemType) &&
SCR_Enum.HasPartialFlag(supportedSlotModes, itemMode);
152 super.EOnInit(owner);
164 RplComponent rpl = RplComponent.Cast(owner.
FindComponent(RplComponent));
165 if (!rpl || (rpl && rpl.Role() ==
RplRole.Authority))
180 super.OnPostInit(owner);
188 super.OnDelete(owner);
ArmaReforgerScripted GetGame()
bool GetSlotValid(SCR_WeaponRackSlotEntity slotEntity, out bool isEmpty=true)
void RefreshUpdate()
Refresh arsenal after m_fRefreshDelay delay.
void RegisterSlot(SCR_WeaponRackSlotEntity slot)
bool GetItemValidForSlot(SCR_EArsenalItemType itemType, SCR_EArsenalItemMode itemMode, SCR_EArsenalItemType supportedSlotTypes, SCR_EArsenalItemMode supportedSlotModes)
ref array< SCR_WeaponRackSlotEntity > m_aSlots
void OnArsenalGameModeTypeChanged()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external int SetEventMask(notnull IEntity owner, int mask)
proto external Managed FindComponent(typename typeName)
proto external IEntity GetChildren()
proto external IEntity GetSibling()
SCR_Faction GetAssignedFaction()
void SetSupportedArsenalItemModes(SCR_EArsenalItemMode modes)
bool GetItemValid(SCR_EArsenalItemType arsenalItemType, SCR_EArsenalItemMode arsenalItemMode)
void RefreshArsenal(bool init=false, SCR_Faction faction=null)
bool GetFilteredArsenalItems(out notnull array< SCR_ArsenalItem > filteredArsenalItems, EArsenalItemDisplayType requiresDisplayType=-1)
void EOnInit(IEntity owner)
void SetSupportedArsenalItemTypes(SCR_EArsenalItemType types)
SCR_EArsenalItemType GetItemType()
SCR_ArsenalItemDisplayData GetDisplayDataOfType(EArsenalItemDisplayType displayType)
Resource GetItemResource()
SCR_EArsenalItemMode GetItemMode()
void RemoveItem()
Delete the slot's item (first found child).
SCR_EArsenalItemType GetSlotSupportedItemTypes()
SCR_EArsenalItemMode GetCurrentOccupiedItemMode()
void SpawnNewItem(Resource itemResource, SCR_ArsenalItem arsenalData, SCR_ArsenalItemDisplayData itemDisplayData=null, bool deleteExisting=false)
SCR_EArsenalItemMode GetSlotSupportedItemModes()
bool CanSpawnItem(bool deleteExisting=false)
SCR_EArsenalItemMode GetCurrentOccupiedItemType()
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
RplRole
Role of replicated node (and all items in it) within the replication system.