Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ModesOverrideEditorAttribute.c
Go to the documentation of this file.
3 {
4  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
5  {
6  if (!IsGameMode(item))
7  return null;
8 
10  if (!core)
11  return null;
12 
13  SCR_EditorSettingsEntity editorSettings = core.GetSettingsEntity();
14  if (!editorSettings)
15  return null;
16 
17  return SCR_BaseEditorAttributeVar.CreateBool(editorSettings.IsBaseOverrideEnabled());
18  }
19  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
20  {
22  if (!core)
23  return;
24 
25  SCR_EditorSettingsEntity editorSettings = core.GetSettingsEntity();
26  if (!editorSettings)
27  return;
28 
29  editorSettings.EnableBaseOverride(var.GetBool());
30 
31  //~ If set false set default editor modes settings
32  if (!var.GetBool())
33  editorSettings.SetBaseModes(core.GetBaseModes(EEditorModeFlag.DEFAULT));
34  }
35 
36  override void UpdateInterlinkedVariables(SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit = false)
37  {
38  if (!var)
39  return;
40 
41  if (isInit)
42  manager.SetAttributeAsSubAttribute(SCR_ModesEditorAttribute);
43 
44  manager.SetAttributeEnabled(SCR_ModesEditorAttribute, var && var.GetBool());
45  }
46 };
SCR_EditorSettingsEntity
Definition: SCR_EditorSettingsEntity.c:12
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_EditorManagerCore
Core component to manage SCR_EditorManagerEntity.
Definition: SCR_EditorManagerCore.c:5
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
SCR_ModesEditorAttribute
Definition: SCR_ModesEditorAttribute.c:5
EEditorModeFlag
EEditorModeFlag
Definition: EEditorModeFlag.c:1
SCR_ModeOverrideEditorAttribute
Definition: SCR_ModesOverrideEditorAttribute.c:2
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