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_BasePlayerLoadout.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_BasePlayerLoadout
3
{
4
//------------------------------------------------------------------------------------------------
6
ResourceName
GetLoadoutResource()
7
{
8
return
ResourceName
.Empty;
9
}
10
11
//------------------------------------------------------------------------------------------------
13
string
GetLoadoutName()
14
{
15
return
string
.Empty;
16
}
17
18
//------------------------------------------------------------------------------------------------
20
ResourceName
GetLoadoutImageResource()
21
{
22
return
ResourceName
.Empty;
23
}
24
25
//------------------------------------------------------------------------------------------------
29
bool
IsLoadoutAvailable(
int
playerId)
30
{
31
return
true
;
32
}
33
34
//------------------------------------------------------------------------------------------------
37
bool
IsLoadoutAvailableClient()
38
{
39
return
true
;
40
}
41
42
//------------------------------------------------------------------------------------------------
45
void
OnLoadoutSpawned(
GenericEntity
pOwner,
int
playerId)
46
{
47
}
48
49
//------------------------------------------------------------------------------------------------
53
static
SCR_ECharacterRank GetLoadoutRequiredRank(notnull
SCR_BasePlayerLoadout
loadout
,
int
playerId)
54
{
55
SCR_PlayerArsenalLoadout
arsenalLoadout =
SCR_PlayerArsenalLoadout
.Cast(
loadout
);
56
if
(arsenalLoadout && playerId > 0)
57
return
arsenalLoadout.GetRequiredRank(playerId);
58
59
ResourceName
loadoutResource =
loadout
.GetLoadoutResource();
60
if
(!loadoutResource)
61
return
SCR_ECharacterRank.PRIVATE;
62
63
Resource
resource =
Resource
.Load(loadoutResource);
64
if
(!resource)
65
return
SCR_ECharacterRank.PRIVATE;
66
67
SCR_EntityCatalogManagerComponent entityCatalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
68
if
(!entityCatalogManager)
69
return
SCR_ECharacterRank.PRIVATE;
70
71
SCR_EntityCatalogEntry
entry = entityCatalogManager.GetEntryWithPrefabFromAnyCatalog(
EEntityCatalogType
.CHARACTER, resource.GetResource().GetResourceName());
72
if
(!entry)
73
return
SCR_ECharacterRank.PRIVATE;
74
75
SCR_EntityCatalogLoadoutData
data
=
SCR_EntityCatalogLoadoutData
.Cast(entry.
GetEntityDataOfType
(
SCR_EntityCatalogLoadoutData
));
76
if
(!
data
)
77
return
SCR_ECharacterRank.PRIVATE;
78
79
return
data
.GetRequiredRank();
80
}
81
}
EEntityCatalogType
EEntityCatalogType
Definition
EEntityCatalogType.c:5
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
loadout
string loadout
Definition
SCR_ArsenalManagerComponent.c:0
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
GenericEntity
Definition
GenericEntity.c:16
Resource
Object holding reference to resource. In destructor release the resource.
Definition
Resource.c:25
ResourceName
Definition
ResourceName.c:13
SCR_BasePlayerLoadout
Definition
SCR_BasePlayerLoadout.c:3
SCR_EntityCatalogEntry
Definition
SCR_EntityCatalogEntry.c:6
SCR_EntityCatalogEntry::GetEntityDataOfType
Get prefab entity Data of type Ignores disabled Data s param dataType class of Data type you with to obtain return Entity Data of given type Null if not found *SCR_BaseEntityCatalogData GetEntityDataOfType(typename dataType)
Definition
SCR_EntityCatalogEntry.c:180
SCR_EntityCatalogLoadoutData
Definition
SCR_EntityCatalogLoadoutData.c:7
SCR_PlayerArsenalLoadout
Definition
SCR_PlayerArsenalLoadout.c:3
scripts
Game
GameMode
Loadout
SCR_BasePlayerLoadout.c
Generated by
1.17.0