Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseArsenalRefundEffect.c
Go to the documentation of this file.
1[BaseContainerProps(configRoot: true), BaseContainerCustomCheckIntTitleField("m_bEnabled", "DO NOT USE BASE CLASS", "(Disabled) DO NOT USE BASE CLASS", 1)]
3{
4 [Attribute("1", desc: "If entry is disabled it will be removed on init")]
5 bool m_bEnabled;
6
7 [Attribute("0", desc: "Will not have any effect if within the list of: SCR_MultiExecuteListArsenalRefundEffect or SCR_WeightedListArsenalRefundEffect.\n\nThe entries with the highest priority will be checked first if they are valid. Equal priority will be checked in order of the array")]
8 int m_iPriority;
9
10 [Attribute(SCR_EArsenalTypes.STATIC_ENTITIES.ToString(), desc: "Which arsenal types can the item be handed in at for this effect to trigger", uiwidget: UIWidgets.Flags, enums: ParamEnumArray.FromEnum(SCR_EArsenalTypes))]
11 protected SCR_EArsenalTypes m_eHandInArsenalTypes;
12
13 //------------------------------------------------------------------------------------------------
16 void Init(SCR_ArsenalRefundEffectComponentClass arsenalRefundEffectClass);
17
18 //------------------------------------------------------------------------------------------------
24 bool IsValid(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal)
25 {
27 return (arsenal && SCR_Enum.HasFlag(m_eHandInArsenalTypes, arsenal.GetArsenalType()));
28 }
29
30 //------------------------------------------------------------------------------------------------
36 bool ExecuteRefundEffect(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal);
37
38 //------------------------------------------------------------------------------------------------
44 protected bool UsedFriendlyArsenal(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal)
45 {
46 //~ No arsenal so can never check if it was handed in at a friendly arsenal
47 if (!arsenal)
48 return false;
49
50 SCR_Faction arsenalFaction = arsenal.GetAssignedFaction();
51 if (!arsenalFaction)
52 return false;
53
54 Faction playerFaction = SCR_FactionManager.SGetPlayerFaction(playerController.GetPlayerId());
55 if (!playerFaction)
56 return false;
57
58 return arsenalFaction.DoCheckIfFactionFriendly(playerFaction);
59 }
60}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_FactionManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_ValuableIntelArsenalRefundEffect SCR_WeightedListArsenalRefundEffect BaseContainerCustomCheckIntTitleField("m_bEnabled", "Valuable Intel - Add XP", "(Disabled) Valuable Intel - Add XP", 1)
SCR_EArsenalTypes GetArsenalType()
void Init(SCR_ArsenalRefundEffectComponentClass arsenalRefundEffectClass)
bool UsedFriendlyArsenal(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal)
bool IsValid(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal)
bool ExecuteRefundEffect(notnull IEntity item, notnull PlayerController playerController, SCR_ArsenalComponent arsenal)
override bool DoCheckIfFactionFriendly(Faction faction)
SCR_FieldOfViewSettings Attribute