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_ItemAttributeCollection.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_ItemAttributeCollection
:
ItemAttributeCollection
3
{
4
[
Attribute
(
"2"
,
UIWidgets
.ComboBox,
"Slot size"
,
""
, ParamEnumArray.FromEnum(
ESlotSize
))]
5
protected
ESlotSize
m_Size
;
6
7
[
Attribute
(
SCR_EQuickSlotSize
.DEFAULT.ToString(),
desc
:
"Slot size when item is equipped in quickbar. Set default to keep original slot size"
, uiwidget:
UIWidgets
.ComboBox, enums: ParamEnumArray.FromEnum(
SCR_EQuickSlotSize
))]
8
protected
SCR_EQuickSlotSize
m_eQuickSlotSize
;
9
10
[
Attribute
(
"2"
,
UIWidgets
.ComboBox,
"Slot size"
,
""
, ParamEnumArray.FromEnum(
ESlotID
))]
11
protected
ESlotID
m_SlotType
;
12
13
[
Attribute
(
"1"
,
UIWidgets
.CheckBox,
"Sets item movable by drag'n'drop"
)]
14
protected
bool
m_bDraggable
;
15
16
[
Attribute
(
"1"
,
UIWidgets
.CheckBox,
"Sets item visible in inventory"
)]
17
protected
bool
m_bVisible
;
18
19
[
Attribute
(
"1"
,
UIWidgets
.CheckBox,
"Sets item stackable in inventory"
)]
20
protected
bool
m_bStackable
;
21
22
[
Attribute
(
"1"
,
UIWidgets
.CheckBox,
"Allows for the item to be refunded in arsenals (set to false for mission critical items)"
)]
23
protected
bool
m_bRefundable
;
24
25
private
ItemPhysicalAttributes
m_PhysAttributes;
26
27
//------------------------------------------------------------------------------------------------
28
float
GetVolume()
29
{
30
if
(m_PhysAttributes != null)
31
{
32
return
m_PhysAttributes.GetVolume();
33
}
34
return
0.0;
35
}
36
37
38
//------------------------------------------------------------------------------------------------
39
float
GetWeight()
40
{
41
if
(m_PhysAttributes != null)
42
{
43
return
m_PhysAttributes.GetWeight();
44
}
45
return
0.0;
46
};
47
48
//------------------------------------------------------------------------------------------------
49
bool
IsDraggable()
50
{
51
return
m_bDraggable
;
52
}
53
54
//------------------------------------------------------------------------------------------------
55
bool
IsVisible
(InventoryItemComponent inventoryItem)
56
{
57
return
m_bVisible
;
58
}
59
60
//------------------------------------------------------------------------------------------------
61
bool
IsStackable()
62
{
63
return
m_bStackable
;
64
}
65
66
//------------------------------------------------------------------------------------------------
67
bool
IsRefundable()
68
{
69
return
m_bRefundable
;
70
}
71
72
//------------------------------------------------------------------------------------------------
73
void
SetSlotSize(
ESlotSize
slotSize )
74
{
75
m_Size
= slotSize;
76
}
77
78
//------------------------------------------------------------------------------------------------
79
void
SetDraggable(
bool
isDraggable)
80
{
81
m_bDraggable
= isDraggable;
82
}
83
84
//------------------------------------------------------------------------------------------------
85
void
SetRefundable(
bool
isRefundable)
86
{
87
m_bRefundable
= isRefundable;
88
}
89
90
//------------------------------------------------------------------------------------------------
91
void
SetSlotType(
ESlotID
slotID )
92
{
93
m_SlotType
= slotID;
94
}
95
96
//------------------------------------------------------------------------------------------------
97
ESlotID
GetSlotType
() {
return
m_SlotType
; }
98
99
//------------------------------------------------------------------------------------------------
100
int
GetSlotSum()
101
{
102
int
iRetVal = 0;
103
switch
(
m_Size
)
104
{
105
case
ESlotSize
.SLOT_1x1: { iRetVal = 1; }
break
;
106
case
ESlotSize
.SLOT_2x1: { iRetVal = 2; }
break
;
107
case
ESlotSize
.SLOT_2x2: { iRetVal = 4; }
break
;
108
case
ESlotSize
.SLOT_3x3: { iRetVal = 9; }
break
;
109
}
110
return
iRetVal;
111
}
112
113
//------------------------------------------------------------------------------------------------
115
ESlotSize
GetItemSize()
116
{
117
return
m_Size
;
118
}
119
121
ESlotSize
GetQuickSlotItemSize()
122
{
123
if
(
m_eQuickSlotSize
==
SCR_EQuickSlotSize
.DEFAULT)
124
return
GetItemSize();
125
126
return
m_eQuickSlotSize
;
127
}
128
129
override
protected
void
OnInitCollection
(
IEntityComponentSource
src)
130
{
131
m_PhysAttributes =
ItemPhysicalAttributes
.Cast(FindAttribute(
ItemPhysicalAttributes
));
132
}
133
};
SCR_EQuickSlotSize
SCR_EQuickSlotSize
Definition
InventoryConstants.c:10
ESlotID
ESlotID
Definition
InventoryConstants.c:15
ESlotSize
ESlotSize
Definition
InventoryConstants.c:2
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
GetSlotType
SCR_EEntitySpawnerSlotType GetSlotType()
Definition
SCR_EntitySpawnerSlotComponent.c:128
IsVisible
bool IsVisible()
Definition
SCR_ResourceComponent.c:885
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
IEntityComponentSource
Definition
IEntityComponentSource.c:13
ItemAttributeCollection
Definition
ItemAttributeCollection.c:13
ItemPhysicalAttributes
Definition
ItemPhysicalAttributes.c:13
SCR_ItemAttributeCollection
Definition
SCR_ItemAttributeCollection.c:3
SCR_ItemAttributeCollection::m_Size
ESlotSize m_Size
Definition
SCR_ItemAttributeCollection.c:5
SCR_ItemAttributeCollection::m_bVisible
bool m_bVisible
Definition
SCR_ItemAttributeCollection.c:17
SCR_ItemAttributeCollection::OnInitCollection
void OnInitCollection(IEntityComponentSource src)
Definition
SCR_ItemAttributeCollection.c:129
SCR_ItemAttributeCollection::m_bDraggable
bool m_bDraggable
Definition
SCR_ItemAttributeCollection.c:14
SCR_ItemAttributeCollection::m_bStackable
bool m_bStackable
Definition
SCR_ItemAttributeCollection.c:20
SCR_ItemAttributeCollection::m_SlotType
ESlotID m_SlotType
Definition
SCR_ItemAttributeCollection.c:11
SCR_ItemAttributeCollection::m_eQuickSlotSize
SCR_EQuickSlotSize m_eQuickSlotSize
Definition
SCR_ItemAttributeCollection.c:8
SCR_ItemAttributeCollection::m_bRefundable
bool m_bRefundable
Definition
SCR_ItemAttributeCollection.c:23
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Inventory
SCR_ItemAttributeCollection.c
Generated by
1.17.0