11 [
Attribute(SCR_EArsenalSupplyCostType.DEFAULT.ToString(),
desc:
"Cost type of items. If it is not DEFAULT than it will try to get the diffrent supply cost if the item has it assigned" , uiwidget:
UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(SCR_EArsenalSupplyCostType),
category:
"Settings")]
14 [
Attribute(
"",
desc:
"Toggle supported SCR_EArsenalItemType by this arsenal, items are gathered from SCR_Faction or from the overwrite config", uiwidget:
UIWidgets.Flags, enums: ParamEnumArray.FromEnum(
SCR_EArsenalItemType),
category:
"Settings")]
17 [
Attribute(
"",
desc:
"Toggle supported SCR_EArsenalItemMode by this arsenal, items are gathered from SCR_Faction or from the overwrite config", uiwidget:
UIWidgets.Flags, enums: ParamEnumArray.FromEnum(
SCR_EArsenalItemMode),
category:
"Settings")]
23 [
Attribute(
category:
"Overwrite",
desc:
"If empty this will be ignored. For ease of use do not edit this directly in the prefab, use a config instead. The items added the config will allow the arsenal to spawn these items within it. Note that it will still filter on type, meaning that if weapons are added to the list but disabled in the Supported types then they will not show in the arsenal. Changing faction will not have any effect if this is not null")]
26 [
Attribute(
"0",
desc:
"Whether or not the overwrite arsenal config still checks if the items are in the correct faction. Hides any items not belonging to the arsenal's faction.",
category:
"Overwrite")]
29 [
Attribute(
"1",
desc:
"Get default faction if current faction could not be found",
category:
"Settings")]
32 [
Attribute(
"0",
desc:
"If true will try and find the SCR_FactionAffiliationComponent from parent if it was not found on self",
category:
"Settings")]
35 [
Attribute(
"0",
desc:
"Save type of Arsenal. Only applicable if there is a save arsenal action attached to the arsenal.\nSAVING_DISABLED: Saving action is disabled.\nIN_ARSENAL_ITEMS_ONLY: Only allow saving if all the items the player has are in the arsenal as well.\nFACTION_ITEMS_ONLY: Only allow saving if all the items the player has in their inventory are of the faction of the arsenal.\nNO_RESTRICTIONS: No restriction as what the arsenal is allowed to save.", uiwidget:
UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(SCR_EArsenalSaveType),
category:
"Settings")]
38 [
Attribute(SCR_EArsenalTypes.STATIC_ENTITIES.ToString(),
desc:
"What arsenal type is this arsenal. As the arsenal manager can disable an arsenal", uiwidget:
UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(SCR_EArsenalTypes),
category:
"Settings")]
41 [
Attribute(
"0",
desc:
"If false it will get the arsenals current faction and change when the faction is updated. If true it will never check the on faction and use the default faction assigned. Use this if you want the content to never change or if there is never a current faction",
category:
"Settings")]
44 [
Attribute(
"1",
desc:
"If false the arsenal is disabled but GM can set it enabled. Setting this to false counts as being overwritten meaning the arsenal is not enabled when the arsenal type flag is set in the manager",
category:
"Settings")]
76 return SCR_ArsenalManagerComponent.IsArsenalTypeEnabled_Static(
GetArsenalType());
157 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(owner);
159 return resourceComponent && resourceComponent.IsResourceTypeEnabled();
217 if (saveType != SCR_EArsenalSaveType.SAVING_DISABLED)
241 return arsenalComponent;
294 array<SCR_ArsenalItem> arsenalItems = {};
300 for (
int i = 0; i < arsenalItems.Count(); i++)
308 return !availablePrefabs.IsEmpty();
341 bool GetFilteredArsenalItems(out notnull array<SCR_ArsenalItem> filteredArsenalItems, EArsenalItemDisplayType requiresDisplayType = -1)
347 return !filteredArsenalItems.IsEmpty();
351 SCR_EntityCatalogManagerComponent catalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
357 return !filteredArsenalItems.IsEmpty();
373 return !filteredArsenalItems.IsEmpty();
390 array<SCR_ArsenalItem> arsenalItems = {};
396 array<ResourceName> arsenalPrefabs = {};
398 int arsenalItemCount = arsenalItems.Count();
399 for (
int i = 0; i < arsenalItemCount; i++)
436 array<ResourceName> arsenalPrefabs = {};
527 RplComponent rplComponent = RplComponent.Cast(owner.
FindComponent(RplComponent));
529 if (rplComponent && rplComponent.Role() ==
RplRole.Authority)
534 SCR_ArsenalManagerComponent arsenalManager;
536 if (SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager))
565 RplComponent rplComponent = RplComponent.Cast(owner.
FindComponent(RplComponent));
566 if (rplComponent && rplComponent.Role() ==
RplRole.Authority)
571 SCR_ArsenalManagerComponent arsenalManager;
573 if (SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager))
594 int itemTypes, itemModes, saveType;
595 bool isArsenalEnabled;
597 reader.ReadInt(itemTypes);
598 reader.ReadInt(itemModes);
599 reader.ReadInt(saveType);
600 reader.ReadBool(isArsenalEnabled);
611enum SCR_EArsenalSaveType
621enum SCR_EArsenalSupplyCostType
ArmaReforgerScripted GetGame()
SCR_ArsenalComponent FACTION_ITEMS_ONLY
Only allow saving if items the player has are items of the player faction.
SCR_ArsenalComponent FRIENDLY_AND_FACTION_ITEMS_ONLY
Only allow saving if items the player has are items of the player faction or from a faction friendly ...
SCR_ArsenalComponent SAVING_DISABLED
Saving is disabled.
func ScriptInvokerArsenalUpdatedMethod
SCR_ArsenalComponent GADGET_ARSENAL
If the arsenal is on a gadget it will try to take this cost if any is assigned in the catalog.
ScriptInvokerBase< ScriptInvokerArsenalUpdatedMethod > ScriptInvokerArsenalUpdated
SCR_ArsenalComponent RESPAWN_COST
Cost of item when the player spawns with the item.
SCR_ArsenalComponent NO_RESTRICTIONS
Always allow saving of arsenal.
SCR_ArsenalComponent IN_ARSENAL_ITEMS_ONLY
Only allows arsenal saving if all the items the player has are in the arsenal.
SCR_BaseGameMode GetGameMode()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_EArsenalAttributeGroup
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external int SetEventMask(notnull IEntity owner, int mask)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
bool GetItemValid(SCR_Faction faction, int index, out bool isEmpty=true)
SCR_Faction GetAssignedFaction()
SCR_EArsenalSaveType m_eArsenalSaveType
SCR_EArsenalAttributeGroup GetEditableAttributeGroups()
FactionManager m_FactionManager
SCR_EArsenalTypes GetArsenalType()
void OnArsenalTypeEnabledChanged(SCR_EArsenalTypes typesEnabled)
void RPL_SetArsenalSaveType(SCR_EArsenalSaveType saveType)
bool m_bHasSaveArsenalAction
Set by action in action manager for the editor to know if the Arsenal save action exists on this arse...
SCR_ArsenalInventoryStorageManagerComponent m_InventoryComponent
bool m_bAlwaysUseDefaultFaction
static SCR_ArsenalComponent FindArsenalComponent(notnull IEntity entity, bool getFromSlotted=true)
bool IsArsenalUsingSupplies()
void OnDelete(IEntity owner)
void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction)
ref ScriptInvokerArsenalUpdated m_OnArsenalUpdated
void SetArsenalEnabledBroadcast(bool enable)
SCR_EArsenalAttributeGroup m_eEditableAttributeGroups
void SetSupportedArsenalItemModes(SCR_EArsenalItemMode modes)
UniversalInventoryStorageComponent m_StorageComponent
SCR_FactionAffiliationComponent m_FactionComponent
SCR_EArsenalItemType m_eSupportedArsenalItemTypes
void SetHasSaveArsenalAction(bool hasSaveArsenalAction)
void SetArsenalEnabled(bool enable, bool isOverwrite=true)
bool m_bCheckFactionForOverwriteArsenalConfig
bool GetAvailablePrefabs(out notnull array< ResourceName > availablePrefabs)
void DelayedOnArsenalUpdatedClient(SCR_EArsenalItemType itemTypes, SCR_EArsenalItemMode itemModes)
bool m_bArsenalSavingDisplayedIfDisabled
This is auto set on init and when arsenal save type is changed. If the prefab has saving disabled tha...
bool GetFilteredOverwriteArsenalItems(out notnull array< SCR_ArsenalItem > filteredArsenalItems, EArsenalItemDisplayType requiresDisplayType=-1)
void OnPostInit(IEntity owner)
bool GetItemValid(SCR_EArsenalItemType arsenalItemType, SCR_EArsenalItemMode arsenalItemMode)
SCR_EArsenalSupplyCostType m_eSupplyCostType
void OnArsenalGameModeTypeChanged(SCR_EArsenalGameModeType newArsenalGameModeType)
void UpdateArsenalEnabledState()
void SetArsenalSaveType(SCR_EArsenalSaveType saveType)
SCR_EArsenalItemMode m_eSupportedArsenalItemModes
ref SCR_ArsenalItemListConfig m_OverwriteArsenalConfig
bool IsArsenalSavingDisplayedIfDisabled()
SCR_ArsenalItemListConfig GetOverwriteArsenalConfig()
SCR_EArsenalSaveType GetArsenalSaveType()
void FactionInit(IEntity owner)
void RefreshArsenal(bool init=false, SCR_Faction faction=null)
bool m_bIsClearingInventory
bool HasSaveArsenalAction()
bool m_bArsenalEnabledOverwritten
override bool RplLoad(ScriptBitReader reader)
void RPC_OnArsenalUpdated(SCR_EArsenalItemType itemTypes, SCR_EArsenalItemMode itemModes)
bool GetFilteredArsenalItems(out notnull array< SCR_ArsenalItem > filteredArsenalItems, EArsenalItemDisplayType requiresDisplayType=-1)
bool IsArsenalEnabledByType()
SCR_EArsenalSupplyCostType GetSupplyCostType()
SCR_EArsenalTypes m_eArsenalTypes
SCR_EArsenalItemMode GetSupportedArsenalItemModes()
bool m_bGetDefaultIfNoFaction
override bool RplSave(ScriptBitWriter writer)
ScriptInvokerArsenalUpdated GetOnArsenalUpdated()
SCR_ArsenalInventoryStorageManagerComponent GetArsenalInventoryComponent()
void EOnInit(IEntity owner)
SCR_EArsenalItemMode m_eOnDisableArsenalModes
bool m_bAllowGetFactionFromParent
SCR_EArsenalItemType GetSupportedArsenalItemTypes()
void SetSupportedArsenalItemTypes(SCR_EArsenalItemType types)
ResourceName GetItemResourceName()
proto external GenericEntity GetOwner()
Get owner entity.
@ DEFAULT
Use currently set main RT format (based on game options).
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
RplRole
Role of replicated node (and all items in it) within the replication system.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.