Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_WeaponAttachmentsStorageComponentSerializer.c
Go to the documentation of this file.
1
class
SCR_BaseInventoryStorageComponentSerializerSlot
2
{
3
[
SortAttribute
()]
4
int
m_iNumRequirements = 0;
5
6
BaseInventoryStorageComponentSerializerSlot
m_pSlot;
7
8
//------------------------------------------------------------------------------------------------
9
void
SCR_BaseInventoryStorageComponentSerializerSlot(
BaseInventoryStorageComponentSerializerSlot
slot)
10
{
11
m_pSlot = slot;
12
13
auto
inventoryItemComponent =
InventoryItemComponent
.Cast(slot.GetEntity().
FindComponent
(
InventoryItemComponent
));
14
if
(!inventoryItemComponent)
15
return
;
16
17
auto
obstructionAttributes =
SCR_WeaponAttachmentObstructionAttributes
.Cast(inventoryItemComponent.FindAttribute(
SCR_WeaponAttachmentObstructionAttributes
));
18
if
(!obstructionAttributes)
19
return
;
20
21
m_iNumRequirements = obstructionAttributes.
GetRequiredAttachmentTypes
().Count();
22
}
23
}
24
25
class
SCR_WeaponAttachmentsStorageComponentSerializer :
WeaponAttachmentsStorageComponentSerializer
26
{
27
//------------------------------------------------------------------------------------------------
28
override
static
typename
GetTargetType
()
29
{
30
return
SCR_WeaponAttachmentsStorageComponent;
31
}
32
33
//------------------------------------------------------------------------------------------------
34
override
protected
void
HandleInsertionOrder
(inout array<BaseInventoryStorageComponentSerializerSlot> slots)
35
{
36
array<ref SCR_BaseInventoryStorageComponentSerializerSlot> sortedSlots();
37
foreach
(
auto
slot : slots)
38
{
39
SCR_BaseInventoryStorageComponentSerializerSlot
sortSlot(slot);
40
sortedSlots.Insert(sortSlot);
41
}
42
sortedSlots.Sort();
43
44
slots.Clear();
45
foreach
(
auto
sortedSlot : sortedSlots)
46
{
47
slots.Insert(sortedSlot.m_pSlot);
48
}
49
}
50
}
GetTargetType
class SCR_PersistentThreatSector GetTargetType()
Definition
AIControlComponentSerializer.c:12
BaseInventoryStorageComponentSerializer::HandleInsertionOrder
void HandleInsertionOrder(inout array< BaseInventoryStorageComponentSerializerSlot > slots)
BaseInventoryStorageComponentSerializerSlot
Definition
BaseInventoryStorageComponentSerializerSlot.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
InventoryItemComponent
Definition
InventoryItemComponent.c:13
SCR_BaseInventoryStorageComponentSerializerSlot
Definition
SCR_WeaponAttachmentsStorageComponentSerializer.c:2
SCR_WeaponAttachmentObstructionAttributes
Definition
SCR_WeaponAttachmentObstructionAttributes.c:2
SCR_WeaponAttachmentObstructionAttributes::GetRequiredAttachmentTypes
set< typename > GetRequiredAttachmentTypes()
Definition
SCR_WeaponAttachmentObstructionAttributes.c:22
SortAttribute
Definition
SortAttribute.c:43
WeaponAttachmentsStorageComponentSerializer
Definition
WeaponAttachmentsStorageComponentSerializer.c:13
scripts
Game
Plugins
Persistence
System
Serializers
Components
Weapon
SCR_WeaponAttachmentsStorageComponentSerializer.c
Generated by
1.17.0