Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskExecutorGroup.c
Go to the documentation of this file.
2{
3 [Attribute()]
4 protected int m_iGroupID;
5
6 //------------------------------------------------------------------------------------------------
7 override bool IsClonedBy(SCR_TaskExecutor executor)
8 {
9 if (!super.IsClonedBy(executor))
10 return false;
11
12 SCR_TaskExecutorGroup executorGroup = SCR_TaskExecutorGroup.Cast(executor);
13 if (!executorGroup)
14 return false;
15
16 if (m_iGroupID != executorGroup.GetGroupID())
17 return false;
18
19 return true;
20 }
21
22 //------------------------------------------------------------------------------------------------
24 {
25 SCR_GroupsManagerComponent groupsManagerComponent = SCR_GroupsManagerComponent.GetInstance();
26 if (!groupsManagerComponent)
27 return FactionKey.Empty;
28
29 SCR_AIGroup group = groupsManagerComponent.FindGroup(m_iGroupID);
30 if (!group)
31 return FactionKey.Empty;
32
33 return group.GetFactionName();
34 }
35
36 //------------------------------------------------------------------------------------------------
37 override int GetGroupID()
38 {
39 return m_iGroupID;
40 }
41
42 //------------------------------------------------------------------------------------------------
43 void SetGroupID(int groupID)
44 {
45 m_iGroupID = groupID;
46 }
47
48 //------------------------------------------------------------------------------------------------
49 static bool Extract(SCR_TaskExecutorGroup instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
50 {
51 snapshot.SerializeInt(instance.m_iGroupID);
52 return true;
53 }
54
55 //------------------------------------------------------------------------------------------------
56 static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_TaskExecutorGroup instance)
57 {
58 snapshot.SerializeInt(instance.m_iGroupID);
59 return true;
60 }
61
62 //------------------------------------------------------------------------------------------------
63 static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
64 {
65 snapshot.EncodeInt(packet);
66 }
67
68 //------------------------------------------------------------------------------------------------
69 static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
70 {
71 snapshot.DecodeInt(packet);
72 return true;
73 }
74
75 //------------------------------------------------------------------------------------------------
77 {
78 return lhs.CompareSnapshots(rhs, 4);
79 }
80
81 //------------------------------------------------------------------------------------------------
83 {
84 return snapshot.CompareInt(instance.m_iGroupID);
85 }
86}
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
string GetFactionName()
override bool IsClonedBy(SCR_TaskExecutor executor)
static bool PropCompare(SCR_TaskExecutorGroup instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
static bool Extract(SCR_TaskExecutorGroup instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_TaskExecutorGroup instance)
override FactionKey GetFactionKey()
SCR_FieldOfViewSettings Attribute