Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SnapYPositionEditorAttribute.c
Go to the documentation of this file.
1 
6 {
7  protected ref ScriptInvoker Event_OnValueChanged = new ScriptInvoker;
8 
9  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
10  {
11  //Disable
12  return null;
13 
14  SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(item);
15  if (!editableEntity)
16  return null;
17 
18  if (!IsValidEntityType(editableEntity.GetEntityType()))
19  return null;
20 
21  //~Todo: Make sure chilren positions are set correctly
22  if (editableEntity.GetChildrenCount() > 0)
23  return null;
24 
25  //Resets everytime editor is opened
26  return SCR_BaseEditorAttributeVar.CreateBool(true);
27  }
28 
29  ScriptInvoker GetOnChanged()
30  {
31  return Event_OnValueChanged;
32  }
33 
34  override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
35  {
36  Event_OnValueChanged.Invoke(GetVariableOrCopy().GetBool());
37  }
38 };
SCR_SnapYPositionEditorAttribute
Definition: SCR_SnapYPositionEditorAttribute.c:5
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_ValidTypeBaseEditorAttribute
Definition: SCR_ValidTypeBaseEditorAttribute.c:3
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