Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EntityFactionEditorAttribute.c
Go to the documentation of this file.
1 // Script File
7 {
8  protected override bool ValidEntity(GenericEntity entity)
9  {
11  if (!factionComponent)
12  return false;
13 
14  Vehicle vehicle = Vehicle.Cast(entity);
15  if (vehicle)
16  return false;
17 
18  SCR_ArsenalComponent arsenalComponent = SCR_ArsenalComponent.FindArsenalComponent(entity);
19  if (arsenalComponent)
20  return false;
21 
22  return true;
23  }
24 
25  protected override Faction GetFaction(GenericEntity entity)
26  {
27  return SCR_FactionAffiliationComponent.Cast(entity.FindComponent(SCR_FactionAffiliationComponent)).GetAffiliatedFaction();
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_EntityFactionEditorAttribute
Definition: SCR_EntityFactionEditorAttribute.c:6
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