Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TestEditorAttribute.c
Go to the documentation of this file.
1 //#define ATTRIBUTES_DEBUG
4 {
5  [Attribute()];
6  private bool m_bRandomize;
7 
8  [Attribute()];
9  private bool m_bIncompatible;
10 
11  private bool m_Value;
12 
13  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
14  {
15  #ifndef ATTRIBUTES_DEBUG
16  return null;
17  #endif
18  if (m_bIncompatible) return null;
19  Print(GetUIInfo().GetName() + ": Read " + m_Value.ToString(), LogLevel.DEBUG);
20  return SCR_BaseEditorAttributeVar.CreateBool(m_Value);
21  }
22  override SCR_BaseEditorAttributeVar CreateDefaultVariable()
23  {
24  return SCR_BaseEditorAttributeVar.CreateBool(false);
25  }
26 
27  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
28  {
29  if (var) m_Value = var.GetInt();
30  Print(GetUIInfo().GetName() + ": Write " + m_Value.ToString(), LogLevel.DEBUG);
31  }
32  override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
33  {
34  Print(GetUIInfo().GetName() + ": Preview", LogLevel.DEBUG);
35  }
36 
38  {
39  if (m_bRandomize) m_Value = Math.RandomIntInclusive(0, 1);
40  }
41 };
GetName
string GetName()
Definition: SCR_ScenarioFrameworkLayerBase.c:85
SCR_TestEditorAttribute
Definition: SCR_TestEditorAttribute.c:3
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
GetUIInfo
SCR_UIInfo GetUIInfo()
Definition: SCR_EditableEntityCampaignBuildingModeLabelSetting.c:27
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
m_Value
class SCR_ScenarioFrameworkParamBase m_Value
Definition: SCR_ScenarioFrameworkActionsGetters.c:20
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