Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ArsenalFactionEditorAttribute.c
Go to the documentation of this file.
4 {
5  //------------------------------------------------------------------------------------------------
6  protected override bool ValidEntity(GenericEntity entity)
7  {
8  SCR_ArsenalComponent arsenalComponent = SCR_ArsenalComponent.FindArsenalComponent(entity);
9  if (!arsenalComponent)
10  return false;
11 
12  //~ Not allowed to change faction if arsenal items are being overwritten as this would not do anything
13  if (arsenalComponent.GetOverwriteArsenalConfig())
14  return false;
15 
17  if (!factionComponent)
18  return false;
19 
20  return true;
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  protected override Faction GetFaction(GenericEntity entity)
25  {
26  return SCR_FactionAffiliationComponent.Cast(entity.FindComponent(SCR_FactionAffiliationComponent)).GetAffiliatedFaction();
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  protected override void SetFaction(GenericEntity entity, Faction faction)
31  {
33  if (!factionComponent)
34  return;
35 
36  factionComponent.SetAffiliatedFaction(faction);
37  }
38 }
SCR_ArsenalFactionEditorAttribute
Arsenal Faction Attribute for getting and setting varriables in Editor Attribute window.
Definition: SCR_ArsenalFactionEditorAttribute.c:3
GenericEntity
SCR_GenericBoxEntityClass GenericEntity
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseFactionEditableAttribute
Definition: SCR_BaseFactionEditableAttribute.c:5
Faction
Definition: Faction.c:12
SCR_FactionAffiliationComponent
Definition: SCR_FactionAffiliationComponent.c:10
SCR_ArsenalComponent
Definition: SCR_ArsenalComponent.c:9
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468