Arma Reforger Script API
|
The entity which enables all editor functionality for the player. More...
Public Member Functions | |
override bool | IsOpened () |
Check if the editor is currently opened. | |
void | Toggle () |
Toggle the editor. | |
void | Open (bool showErrorNotification=true) |
Open the editor. | |
void | Close (bool showErrorNotification=true) |
Close the editor. | |
bool | CanToggle () |
Check if the editor can be toggled. | |
bool | CanOpen () |
Check if the editor can be opened. | |
bool | CanOpen (EEditorCanOpen accessType) |
Check if specific opening type is enabled. | |
void | SetCanOpen (bool canOpen, EEditorCanOpen accessType) |
Set if the editor can be opened. | |
bool | CanClose () |
Check if the editor can be closed. | |
bool | CanClose (EEditorCanClose accessType) |
Check if specific closing type is enabled. | |
void | SetCanClose (bool canClose, EEditorCanClose accessType) |
Set if the editor can be closed. | |
void | SetAutoInit (bool isAutoInit=false) |
Set if the editor to be opened right when the editor manager is created. | |
bool | IsAutoInit () |
void | SetAutoModes (bool isAutoModes=false) |
Set if editor modes should be created automatically. | |
int | GetPlayerID () |
Get ID of the player to whom the editor manager belongs to. | |
bool | IsOwner () |
bool | IsInTransition () |
Check if the editor is currently opening or closing. | |
bool | IsLimited () |
Check if the editor is limited, i.e., none of available modes give the user full Game Master powers. | |
override SCR_EditorManagerEntity | GetManager () |
Get editor manager. | |
void | SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero) |
Show notification. | |
override ScriptInvoker | GetOnInit () |
Get event which is called when editor is initialized. | |
override ScriptInvoker | GetOnOpened () |
Get event which is called when editor is opened. | |
override ScriptInvoker | GetOnPreActivate () |
Get event which is called before the entity is activated. | |
override ScriptInvoker | GetOnActivate () |
Get event which is called when the entity is activated. | |
override ScriptInvoker | GetOnPostActivate () |
Get event which is called when the entity is activated, but after all GetOnActivate() functions were called. | |
override ScriptInvoker | GetOnDeactivate () |
Get event which is called when the entity is deactivated. | |
override ScriptInvoker | GetOnClosed () |
Get event which is called when the editor is closed. | |
override ScriptInvoker | GetOnDebug () |
Get event which is called every frame when debug is active. | |
override ScriptInvoker | GetOnOpenedServer () |
Get event which is called when editor is initialized. | |
override ScriptInvoker | GetOnOpenedServerCallback () |
Get event which is called when editor is initialized. | |
override ScriptInvoker | GetOnClosedServer () |
Get event which is called when editor is initialized. | |
override ScriptInvoker | GetOnClosedServerCallback () |
Get event which is called when editor is initialized and async loading finishes. | |
override ScriptInvoker | GetOnActivateServer () |
Get event which is called when the entity is activated. | |
override ScriptInvoker | GetOnDeactivateServer () |
Get event which is called when the entity is deactivated. | |
override ScriptInvoker | GetOnRequest () |
Get event which is called when a request to open/close the editor is sent to server. | |
ScriptInvoker | GetOnCanOpen () |
ScriptInvoker | GetOnCanClose () |
ScriptInvoker | GetOnModeAdd () |
ScriptInvoker | GetOnModeRemove () |
ScriptInvoker | GetOnModeChangeRequest () |
ScriptInvoker | GetOnModeChange () |
ScriptInvoker | GetOnLimitedChange () |
ScriptInvoker | GetOnAsyncLoad () |
ScriptInvoker | GetOnCanEndGameChanged () |
SCR_EditorModeEntity | CreateEditorMode (EEditorMode mode, bool isInit, ResourceName prefab="") |
Create editor mode. | |
void | AddEditorModes (EEditorModeAccess access, EEditorMode modes, bool isInit=false) |
Add editor modes of given type(s). | |
void | RemoveEditorModes (EEditorModeAccess access, EEditorMode modes) |
Removes editor modes of given type(s). | |
void | SetEditorModes (EEditorModeAccess access, EEditorMode modes, bool isInit=false) |
Set editor modes of given type(s), replacing all previous modes. | |
void | RepairEditorModes (bool isInit) |
Go thrugh current editor modes and make sure they all have a mode entity. | |
EEditorMode | GetEditorModes () |
EEditorMode | GetDefaultMode () |
Get the first enabled mode from the list. | |
void | RestorePreviousMode () |
Set editor mode to the previously selected one. | |
bool | SetCurrentMode (bool isLimited) |
Set current (un)limited mode. | |
void | SetCurrentMode (EEditorMode mode) |
Set current editor mode. | |
EEditorMode | GetCurrentMode () |
Get current editor mode. | |
SCR_EditorModeEntity | GetCurrentModeEntity () |
Get current editor mode entity. | |
bool | HasMode (EEditorMode mode) |
Check if the editor has given mode. | |
SCR_EditorModeEntity | FindModeEntity (EEditorMode mode) |
Find editor mode entity for given mode. | |
int | GetModeEntities (out notnull array< SCR_EditorModeEntity > modeEntities) |
Get all mode entities registered in this manager. | |
int | GetModes (out notnull array< EEditorMode > modes) |
Get all modes registered in this manager. | |
EEditorMode | GetModes () |
Get all modes registered in this manager as a bit mask. | |
bool | IsModeChangeRequested () |
Check if the owner is waiting for mode change from server. | |
void | RemoveMode (notnull SCR_EditorModeEntity modeEntity, bool OnDisconnnect) |
void | RequestAllAuthors () |
void | InitServer (int playerID) |
void | PostInitServer () |
void | AutoInit () |
override void | EOnInit (IEntity owner) |
override void | EOnFrame (IEntity owner, float timeSlice) |
void | SCR_EditorManagerEntity (IEntitySource src, IEntity parent) |
void | ~SCR_EditorManagerEntity () |
Public Member Functions inherited from SCR_EditorBaseEntity | |
bool | IsOpened () |
Check if editor is currently opened. | |
SCR_EditorManagerEntity | GetManager () |
Get editor manager. | |
int | FindEditorComponents (out array< SCR_BaseEditorComponent > outComponents) |
Get all editor components. | |
Static Public Member Functions | |
static bool | IsLimitedInstance () |
Check if the local editor instance is limited, i.e., none of available modes give the user full Game Master powers. | |
static bool | ToggleInstance () |
Toggle the local instance of the editor. | |
static bool | OpenInstance () |
Open the local instance of the editor. | |
static bool | CloseInstance () |
Close the local instance of the editor. | |
static bool | IsOpenedInstance (bool includeLimited=true) |
Check if the local editor is currently opened. | |
static bool | CanOpenInstance () |
Check if the local editor can be opened. | |
static bool | CanCloseInstance () |
Check if the local editor can be closed. | |
static SCR_EditorManagerEntity | GetInstance () |
Get the local instance of the editor manager. | |
Protected Member Functions | |
void | ToggleServer (bool open) |
void | ToggleOwner (bool open) |
void | ToggleOwnerServerCallback (bool open) |
int | GetEnumSum (TypeName enumType) |
void | SetCanOpenOwner (EEditorCanOpen canOpen) |
void | SetCanOpenDebug (bool canOpen, EEditorCanOpen accessType=EEditorCanOpen.SCRIPT) |
void | SetCanCloseOwner (EEditorCanClose canClose) |
void | SetCanCloseDebug (bool canClose, EEditorCanClose accessType=EEditorCanClose.SCRIPT) |
bool | IsAuthority () |
void | UpdateLimited () |
void | AddMode (notnull SCR_EditorModeEntity modeEntity, bool isInit) |
void | RemoveModeServer (EEditorMode mode) |
void | CreateEditorModeOwner (EEditorMode mode, int modeEntityId, bool isInit) |
void | SetCurrentModeServer (EEditorMode mode) |
void | SetCurrentModeOwner (EEditorMode mode) |
void | RequestAllAuthorsServer () |
void | FinishAuthorsRequestOwner () |
void | RegisterAuthorOwner (notnull SCR_EditableEntityAuthor author) |
void | StartEvents (EEditorEventOperation type=EEditorEventOperation.NONE) |
void | ProcessEvent () |
This would be so much nicer as a flow chart. | |
bool | ProcessAsyncEvent (bool toActivate, out bool instantContinue) |
void | GetAllComponents (out array< SCR_BaseEditorComponent > outComponents) |
void | Action_EditorToggle (float value, EActionTrigger reason) |
void | Action_GoToLatestNotification (float value, EActionTrigger reason) |
void | ShowDebug () |
SCR_EditableEntityAuthor | GetEntityAuthor () |
int | GetEntityAuthorUID () |
void | ProcessDebug () |
void | InitOwner (int playerID) |
Protected Member Functions inherited from SCR_EditorBaseEntity | |
void | InitComponents (bool isServer) |
void | InitComponent (SCR_BaseEditorComponent component, bool isServer) |
Protected Attributes | |
ref map< EEditorModeAccess, EEditorMode > | m_ModesByAccess = new map<EEditorModeAccess, EEditorMode>() |
SCR_NotificationsComponent | m_NotificationsComponent |
The entity which enables all editor functionality for the player.
void SCR_EditorManagerEntity.SCR_EditorManagerEntity | ( | IEntitySource | src, |
IEntity | parent | ||
) |
void SCR_EditorManagerEntity.~SCR_EditorManagerEntity | ( | ) |
|
protected |
|
protected |
void SCR_EditorManagerEntity.AddEditorModes | ( | EEditorModeAccess | access, |
EEditorMode | modes, | ||
bool | isInit = false |
||
) |
Add editor modes of given type(s).
access | Access layer to which modes are added. Editor will receive modes from all its access layers. |
modes | Flags of added modes |
|
protected |
void SCR_EditorManagerEntity.AutoInit | ( | ) |
bool SCR_EditorManagerEntity.CanClose | ( | ) |
Check if the editor can be closed.
bool SCR_EditorManagerEntity.CanClose | ( | EEditorCanClose | accessType | ) |
Check if specific closing type is enabled.
accessType | Access type |
|
static |
Check if the local editor can be closed.
bool SCR_EditorManagerEntity.CanOpen | ( | ) |
Check if the editor can be opened.
bool SCR_EditorManagerEntity.CanOpen | ( | EEditorCanOpen | accessType | ) |
Check if specific opening type is enabled.
accessType | Access type |
|
static |
Check if the local editor can be opened.
bool SCR_EditorManagerEntity.CanToggle | ( | ) |
Check if the editor can be toggled.
void SCR_EditorManagerEntity.Close | ( | bool | showErrorNotification = true | ) |
Close the editor.
Nothing will happen if the editor is not allowed to be closed.
showErrorNotification | Set to false to prevent sending notification to player when the editor cannot be closed |
|
static |
Close the local instance of the editor.
Nothing will happen if the editor is not allowed to be closed.
SCR_EditorModeEntity SCR_EditorManagerEntity.CreateEditorMode | ( | EEditorMode | mode, |
bool | isInit, | ||
ResourceName | prefab = "" |
||
) |
Create editor mode.
Must be executed on server! No mode will be created when one of given type already exists.
mode | Mode type |
prefab | SCR_EditorModeEntity prefab from which the mode entity will be spawned. When undefined, default will be used (recommended) |
|
protected |
override void SCR_EditorManagerEntity.EOnFrame | ( | IEntity | owner, |
float | timeSlice | ||
) |
override void SCR_EditorManagerEntity.EOnInit | ( | IEntity | owner | ) |
SCR_EditorModeEntity SCR_EditorManagerEntity.FindModeEntity | ( | EEditorMode | mode | ) |
Find editor mode entity for given mode.
|
protected |
|
protected |
EEditorMode SCR_EditorManagerEntity.GetCurrentMode | ( | ) |
Get current editor mode.
SCR_EditorModeEntity SCR_EditorManagerEntity.GetCurrentModeEntity | ( | ) |
Get current editor mode entity.
EEditorMode SCR_EditorManagerEntity.GetDefaultMode | ( | ) |
Get the first enabled mode from the list.
EEditorMode SCR_EditorManagerEntity.GetEditorModes | ( | ) |
|
protected |
|
protected |
|
protected |
|
static |
Get the local instance of the editor manager.
override SCR_EditorManagerEntity SCR_EditorManagerEntity.GetManager | ( | ) |
int SCR_EditorManagerEntity.GetModeEntities | ( | out notnull array< SCR_EditorModeEntity > | modeEntities | ) |
Get all mode entities registered in this manager.
[out] | modeEntities | Array to be filled with mode entities |
EEditorMode SCR_EditorManagerEntity.GetModes | ( | ) |
Get all modes registered in this manager as a bit mask.
int SCR_EditorManagerEntity.GetModes | ( | out notnull array< EEditorMode > | modes | ) |
Get all modes registered in this manager.
[out] | modes | Array to be filled with modes |
override ScriptInvoker SCR_EditorManagerEntity.GetOnActivate | ( | ) |
Get event which is called when the entity is activated.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnActivateServer | ( | ) |
Get event which is called when the entity is activated.
Implements SCR_EditorBaseEntity.
ScriptInvoker SCR_EditorManagerEntity.GetOnAsyncLoad | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnCanClose | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnCanEndGameChanged | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnCanOpen | ( | ) |
override ScriptInvoker SCR_EditorManagerEntity.GetOnClosed | ( | ) |
Get event which is called when the editor is closed.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnClosedServer | ( | ) |
Get event which is called when editor is initialized.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnClosedServerCallback | ( | ) |
Get event which is called when editor is initialized and async loading finishes.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnDeactivate | ( | ) |
Get event which is called when the entity is deactivated.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnDeactivateServer | ( | ) |
Get event which is called when the entity is deactivated.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnDebug | ( | ) |
Get event which is called every frame when debug is active.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnInit | ( | ) |
Get event which is called when editor is initialized.
Implements SCR_EditorBaseEntity.
ScriptInvoker SCR_EditorManagerEntity.GetOnLimitedChange | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnModeAdd | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnModeChange | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnModeChangeRequest | ( | ) |
ScriptInvoker SCR_EditorManagerEntity.GetOnModeRemove | ( | ) |
override ScriptInvoker SCR_EditorManagerEntity.GetOnOpened | ( | ) |
Get event which is called when editor is opened.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnOpenedServer | ( | ) |
Get event which is called when editor is initialized.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnOpenedServerCallback | ( | ) |
Get event which is called when editor is initialized.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnPostActivate | ( | ) |
Get event which is called when the entity is activated, but after all GetOnActivate() functions were called.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnPreActivate | ( | ) |
Get event which is called before the entity is activated.
Implements SCR_EditorBaseEntity.
override ScriptInvoker SCR_EditorManagerEntity.GetOnRequest | ( | ) |
Get event which is called when a request to open/close the editor is sent to server.
Implements SCR_EditorBaseEntity.
int SCR_EditorManagerEntity.GetPlayerID | ( | ) |
Get ID of the player to whom the editor manager belongs to.
bool SCR_EditorManagerEntity.HasMode | ( | EEditorMode | mode | ) |
Check if the editor has given mode.
|
protected |
void SCR_EditorManagerEntity.InitServer | ( | int | playerID | ) |
|
protected |
bool SCR_EditorManagerEntity.IsAutoInit | ( | ) |
bool SCR_EditorManagerEntity.IsInTransition | ( | ) |
Check if the editor is currently opening or closing.
bool SCR_EditorManagerEntity.IsLimited | ( | ) |
Check if the editor is limited, i.e., none of available modes give the user full Game Master powers.
For example, photo mode is limited, and having only means the editor is limited.
|
static |
Check if the local editor instance is limited, i.e., none of available modes give the user full Game Master powers.
For example, photo mode is limited, and having only means the editor is limited.
bool SCR_EditorManagerEntity.IsModeChangeRequested | ( | ) |
Check if the owner is waiting for mode change from server.
override bool SCR_EditorManagerEntity.IsOpened | ( | ) |
|
static |
Check if the local editor is currently opened.
includeLimited | True includes limited open editor, pass false to check for open unlimited editor only |
bool SCR_EditorManagerEntity.IsOwner | ( | ) |
void SCR_EditorManagerEntity.Open | ( | bool | showErrorNotification = true | ) |
Open the editor.
Nothing will happen if the editor is not allowed to be opened.
showErrorNotification | Set to false to prevent sending notification to player when the editor cannot be opened |
|
static |
Open the local instance of the editor.
Nothing will happen if the editor is not allowed to be opened.
void SCR_EditorManagerEntity.PostInitServer | ( | ) |
|
protected |
|
protected |
|
protected |
This would be so much nicer as a flow chart.
|
protected |
void SCR_EditorManagerEntity.RemoveEditorModes | ( | EEditorModeAccess | access, |
EEditorMode | modes | ||
) |
Removes editor modes of given type(s).
access | Access layer to which modes are added. Editor will receive modes from all its access layers. |
modes | Flags of removes modes |
void SCR_EditorManagerEntity.RemoveMode | ( | notnull SCR_EditorModeEntity | modeEntity, |
bool | OnDisconnnect | ||
) |
|
protected |
void SCR_EditorManagerEntity.RepairEditorModes | ( | bool | isInit | ) |
Go thrugh current editor modes and make sure they all have a mode entity.
void SCR_EditorManagerEntity.RequestAllAuthors | ( | ) |
|
protected |
void SCR_EditorManagerEntity.RestorePreviousMode | ( | ) |
Set editor mode to the previously selected one.
void SCR_EditorManagerEntity.SendNotification | ( | ENotification | notificationID, |
int | selfID = 0 , |
||
int | targetID = 0 , |
||
vector | position = vector::Zero |
||
) |
Show notification.
Doesn't actually show a notification, it only triggers an event which other systems can react to.
notificationID | |
selfID | |
targetID | |
position |
void SCR_EditorManagerEntity.SetAutoInit | ( | bool | isAutoInit = false | ) |
Set if the editor to be opened right when the editor manager is created.
Can be used only in Event_OnEditorManagerCreated handler of SCR_EditorManagerEntityEntity
isAutoInit | True to start the editor automatically |
void SCR_EditorManagerEntity.SetAutoModes | ( | bool | isAutoModes = false | ) |
Set if editor modes should be created automatically.
By default it's true, turn it off if you plan to manage modes manually.
isAutoModes | True to automatically create default editor modes. |
void SCR_EditorManagerEntity.SetCanClose | ( | bool | canClose, |
EEditorCanClose | accessType | ||
) |
Set if the editor can be closed.
canOpen | true if it can be closed |
accessType | Access type. Editor can be closed only if all access types are active. |
|
protected |
|
protected |
void SCR_EditorManagerEntity.SetCanOpen | ( | bool | canOpen, |
EEditorCanOpen | accessType | ||
) |
Set if the editor can be opened.
canOpen | true if it can be opened |
accessType | Access type. Editor can be opened only if all access types are active. |
|
protected |
|
protected |
bool SCR_EditorManagerEntity.SetCurrentMode | ( | bool | isLimited | ) |
Set current (un)limited mode.
IsLimited | True to select the first available limited mode, false to selected unlimited mode |
void SCR_EditorManagerEntity.SetCurrentMode | ( | EEditorMode | mode | ) |
Set current editor mode.
mode | New mode. Use -1 to choose first enabled mode from the list. |
|
protected |
|
protected |
void SCR_EditorManagerEntity.SetEditorModes | ( | EEditorModeAccess | access, |
EEditorMode | modes, | ||
bool | isInit = false |
||
) |
Set editor modes of given type(s), replacing all previous modes.
access | Access layer to which modes are added. Editor will receive modes from all its access layers. |
modes | Flags of set modes |
|
protected |
|
protected |
void SCR_EditorManagerEntity.Toggle | ( | ) |
Toggle the editor.
If it's closed it will be opened, and vice versa. Nothing will happen if the desired action is disabled.
|
static |
Toggle the local instance of the editor.
If it's closed it will be opened, and vice versa. Nothing will happen if the desired action is disabled.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |