1 [
EntityEditorProps(
category:
"GameScripted/Editor", description:
"World settings for the editor", color:
"251 91 0 255", icon:
"WBData/EntityEditorProps/entityEditor.png")]
15 protected ResourceName m_EditorManagerPrefab;
17 [
Attribute(
desc:
"True to disable the editor completely.\nFOR DEVELOPMENT PURPOSES ONLY!",
category:
"Editor Settings")]
18 protected bool m_bDisableEditor;
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")]
21 protected bool m_bIsUnlimitedEditorLegal;
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;
26 [
Attribute(
"0", UIWidgets.Flags,
"Editor modes added to every pllayer when they connect.", enums: ParamEnumArray.FromEnum(
EEditorMode),
category:
"Editor Settings")]
36 return core.GetSettingsEntity();
46 ResourceName GetPrefab(ResourceName basePrefab)
48 if (m_EditorManagerPrefab.IsEmpty())
return basePrefab;
49 return m_EditorManagerPrefab;
57 bool IsEditorDisabled()
59 return m_bDisableEditor;
68 bool IsUnlimitedEditorLegal()
70 return m_bIsUnlimitedEditorLegal;
77 void EnableBaseOverride(
bool value)
79 m_bOverrideBaseModes = value;
85 bool IsBaseOverrideEnabled()
87 return m_bOverrideBaseModes;
97 return m_bOverrideBaseModes;
104 void SetBaseModes(
EEditorMode modes,
bool validate =
true)
114 array<SCR_EditorManagerEntity> editorManagers = {};
115 core.GetEditorEntities(editorManagers);
127 if (core) core.SetSettingsEntity(
this);