Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ArsenalFactionEditorAttribute.c
Go to the documentation of this file.
1
4{
5 //------------------------------------------------------------------------------------------------
6 protected override bool ValidEntity(GenericEntity entity)
7 {
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_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
proto external Managed FindComponent(typename typeName)
static SCR_ArsenalComponent FindArsenalComponent(notnull IEntity entity, bool getFromSlotted=true)
SCR_ArsenalItemListConfig GetOverwriteArsenalConfig()
Arsenal Faction Attribute for getting and setting varriables in Editor Attribute window.
override Faction GetFaction(GenericEntity entity)
override void SetFaction(GenericEntity entity, Faction faction)
override bool ValidEntity(GenericEntity entity)