Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditorSettingsEntity.c
Go to the documentation of this file.
1[EntityEditorProps(category: "GameScripted/Editor", description: "World settings for the editor", color: "251 91 0 255", icon: "WBData/EntityEditorProps/entityEditor.png")]
5
8
13{
14 [Attribute(uiwidget: UIWidgets.ResourceNamePicker, desc: "Individual editor manager", params: "et", category: "Editor Settings")]
16
17 [Attribute(desc: "True to disable the editor completely.\nFOR DEVELOPMENT PURPOSES ONLY!", category: "Editor Settings")]
18 protected bool m_bDisableEditor;
19
20 [Attribute(desc: "When enabled, using the editor in this scenario is a legal operation, part of game rules.\nFor example this is enabled in Game Master scenarios which are about GM building the gameplay,\nbut it's disabled in Conflict where only admin can access the editor.", category: "Editor Settings")]
22
23 [Attribute(desc: "When enabled, each player will receive editor modes defined by 'Base Modes' attribute instead of the modes defined in core config.", category: "Editor Settings")]
24 protected bool m_bOverrideBaseModes;
25
26 [Attribute("0", UIWidgets.Flags, "Editor modes added to every pllayer when they connect.", enums: ParamEnumArray.FromEnum(EEditorMode), category: "Editor Settings")]
28
29 [Attribute("", UIWidgets.SearchComboBox, "Skip Streaming Rules", enums: ParamEnumArray.FromEnum(EEditableEntityType), category: "Editor Settings")]
30 protected ref array<EEditableEntityType> m_SkipStreamingRules;
31
36 {
38 if (core)
39 return core.GetSettingsEntity();
40 else
41 return null;
42 }
43
50 {
51 if (m_EditorManagerPrefab.IsEmpty()) return basePrefab;
53 }
54
61 {
62 return m_bDisableEditor;
63 }
64
75
80 void EnableBaseOverride(bool value)
81 {
83 }
84
89 {
91 }
92
97 bool GetBaseModes(out EEditorMode modes = 0)
98 {
99 modes = m_BaseModes;
101 }
102
107 void SetBaseModes(EEditorMode modes, bool validate = true)
108 {
109 m_BaseModes = modes;
110
111 //--- Validate all existing editor modes
112 if (validate)
113 {
115 if (core)
116 {
117 array<SCR_EditorManagerEntity> editorManagers = {};
118 core.GetEditorEntities(editorManagers);
119 foreach (SCR_EditorManagerEntity editorManager: editorManagers)
120 {
121 editorManager.SetEditorModes(EEditorModeAccess.BASE, m_BaseModes, false);
122 }
123 }
124 }
125 }
126
132 bool GetSkipStreamingRules(out notnull array<EEditableEntityType> skipStreamingRules)
133 {
135 return false;
136
137 skipStreamingRules.InsertAll(m_SkipStreamingRules);
138 return !m_SkipStreamingRules.IsEmpty();
139 }
140
142 {
144 if (core)
145 {
146 core.SetSettingsEntity(this);
147 }
148 }
149};
EEditorModeAccess
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void IEntity(IEntitySource src, IEntity parent)
protected script Constructor
Core component to manage SCR_EditorManagerEntity.
SCR_EditorSettingsEntity GetSettingsEntity()
int GetEditorEntities(out notnull array< SCR_EditorManagerEntity > outEditorEntities)
void SetSettingsEntity(SCR_EditorSettingsEntity entity)
bool GetSkipStreamingRules(out notnull array< EEditableEntityType > skipStreamingRules)
bool GetBaseModes(out EEditorMode modes=0)
void SCR_EditorSettingsEntity(IEntitySource src, IEntity parent)
ResourceName GetPrefab(ResourceName basePrefab)
static SCR_EditorSettingsEntity GetInstance()
ref array< EEditableEntityType > m_SkipStreamingRules
void SetBaseModes(EEditorMode modes, bool validate=true)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_FieldOfViewSettings Attribute
EEditorMode
Editor mode that defines overall functionality.
Definition EEditorMode.c:6