Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskUIVisibilityEditorAttribute.c
Go to the documentation of this file.
3{
4 //------------------------------------------------------------------------------------------------
5 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6 {
8 if (!editableEntity)
9 return null;
10
11 IEntity owner = editableEntity.GetOwner();
12 if (!owner)
13 return null;
14
15 SCR_Task task = SCR_Task.Cast(owner);
16 if (!task)
17 return null;
18
19 SCR_ETaskUIVisibility taskUIVisibility = task.GetTaskUIVisibility();
20 return SCR_BaseEditorAttributeVar.CreateInt(taskUIVisibility);
21 }
22
23 //------------------------------------------------------------------------------------------------
24 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
25 {
26 if (!var)
27 return;
28
29 SCR_TaskSystem taskSystem = SCR_TaskSystem.GetInstance();
30 if (!taskSystem)
31 return;
32
34 if (!editableEntity)
35 return;
36
37 IEntity owner = editableEntity.GetOwner();
38 if (!owner)
39 return;
40
41 SCR_Task task = SCR_Task.Cast(owner);
42 if (!task)
43 return;
44
45 taskSystem.SetTaskUIVisibility(task, var.GetInt());
46 }
47}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
static SCR_BaseEditorAttributeVar CreateInt(int value)
Attribute base for Name, icon and float value for other attributes to inherent from.