Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SetTaskCompletionAutomaticEditorAttribute.c
Go to the documentation of this file.
1
//
2
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
3
class
SCR_SetTaskCompletionAutomaticEditorAttribute
:
SCR_BaseEditorAttribute
4
{
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
SCR_EditableTaskComponent
task =
SCR_EditableTaskComponent
.Cast(item);
8
if
(task && task.GetTaskCompletionType() !=
EEditorTaskCompletionType
.ALWAYS_MANUAL)
9
return
SCR_BaseEditorAttributeVar
.CreateBool(task.GetTaskCompletionType() ==
EEditorTaskCompletionType
.AUTOMATIC);
10
else
11
return
null
;
12
}
13
14
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
15
{
16
if
(!var)
17
return
;
18
19
SCR_EditableTaskComponent
task =
SCR_EditableTaskComponent
.Cast(item);
20
21
if
(var.GetBool())
22
task.SetTaskCompletionType(
EEditorTaskCompletionType
.AUTOMATIC);
23
else
24
task.SetTaskCompletionType(
EEditorTaskCompletionType
.MANUAL);
25
}
26
};
SCR_BaseEditorAttributeCustomTitle
Definition:
SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition:
SCR_BaseEditorAttributeVar.c:1
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition:
SCR_BaseEditorAttribute.c:3
EEditorTaskCompletionType
EEditorTaskCompletionType
Way of determening if a task is completed automaticly, manually or always manually (In the latter cas...
Definition:
EEditorTaskCompletionType.c:2
SCR_EditableTaskComponent
void SCR_EditableTaskComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition:
SCR_EditableTaskComponent.c:223
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
SCR_SetTaskCompletionAutomaticEditorAttribute
Definition:
SCR_SetTaskCompletionAutomaticEditorAttribute.c:3
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
Editor
Containers
Attributes
SCR_SetTaskCompletionAutomaticEditorAttribute.c
Generated by
1.8.17