Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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
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};
EEditorModeFlag
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Core component to manage SCR_EditorManagerEntity.
SCR_EditorSettingsEntity GetSettingsEntity()
EEditorMode GetBaseModes(EEditorModeFlag flags=-1, bool coreOnly=false)
void SetBaseModes(EEditorMode modes, bool validate=true)