Arma Reforger Script API
|
Public Member Functions | |
void | CreateEditablePrefab (WorldEditorAPI api, ResourceName prefab, bool onlyUpdate=false, map< string, SCR_EEditablePrefabResult > results=null) |
Create or update editable entity prefab. | |
void | UpdateEditablePrefab (WorldEditorAPI api, ResourceName prefab) |
string | VerifyEditablePrefab (WorldEditorAPI api, ResourceName prefab, bool onlyFileChanges=false) |
bool | MoveFile (string prevPath, string newPath) |
Move a file and its meta file from one path to another. | |
void | LogResults (notnull map< string, SCR_EEditablePrefabResult > results) |
Print auto-configuration results to log. | |
string | GetSourcePath () |
Get source path. | |
string | GetTargetPath () |
Get raw target path. | |
string | GetTargetPathAuto () |
Get path of auto folder in target path. | |
string | GetPrefix () |
Get prefix added to editable entity prefabs. | |
bool | IsValid () |
Check if the config is configured correctly. | |
bool | CreateDirectoryFor (out string filePath, string addon="") |
Create a directory for editable entity prefab on given path. | |
bool | CreateWorld () |
Create empty world which can be safely edited. | |
void | GetLinks (bool forced=false) |
Initialise links to and from editable prefabs. | |
bool | GetLinkFromSource (string guid, out ResourceName linkedPrefab=ResourceName.Empty) |
Get a link from a prefab to its editable prefab. | |
bool | GetLinkFromTarget (string guid, out ResourceName linkedPrefab=ResourceName.Empty) |
Get a link from editable prefab to its source prefab. | |
bool | IsEditableEntity (ResourceName prefab) |
Check if the prefab is an editable entity. | |
ResourceName | GetSourcePrefab (ResourceName prefab) |
Get source prefab of editable entity prefab. | |
void | EditablePrefabsConfig () |
Static Public Member Functions | |
static EditablePrefabsConfig | GetConfig (ResourceName configPath) |
Get config from a prefab. | |
Protected Member Functions | |
ResourceName | MoveEditablePrefab (WorldEditorAPI api, string prevPath, string newPath) |
Move existing editable prefab to a new path (includes also renaming the prefab) | |
void | DeleteEditablePrefab (WorldEditorAPI api, string prefabPath) |
Delete existing editable prefab. | |
bool | UpdateChildPrefabs (WorldEditorAPI api, IEntitySource entitySource, array< ref SCR_EditorLinkEntry > links, bool forceDisable=false, map< string, SCR_EEditablePrefabResult > results=null, int depth=0) |
void | DisableComponent (WorldEditorAPI api, IEntitySource entitySource, BaseContainer componentSource, array< ref ContainerIdPathEntry > componentsPath) |
void | BackupFile (string filePath, out notnull array< string > backup) |
void | CompareBackup (string filePath, notnull array< string > backup) |
ResourceName | GetResourceNameLink (BaseContainer container) |
EditablePrefabsSetting | GetSettings (string prefabPath) |
bool | IsBlacklisted (string path) |
Protected Attributes | |
ResourceName | m_SourceDirectory |
ResourceName | m_TargetDirectory |
string | m_sAutoFolderName |
string | m_sFileNamePrefix |
string | m_sSourceBlacklist |
ref array< ResourceName > | m_SupportEntities |
ref array< ref EditablePrefabsSetting > | m_Settings |
bool | m_bIsValid |
string | m_sSourcePath |
string | m_sTargetPath |
string | m_sTargetPathAuto |
ref map< string, string > | m_mLinksFromTarget |
ref map< string, string > | m_mLinksFromSource |
ref array< string > | m_aSourceBlacklist = {} |
string | m_sCurrentAddon = "$ArmaReforger:" |
Static Protected Attributes | |
static const string | ADDON_PREFIX = "$profile:" |
static const string | WORLD_PATH = "worlds/Plugins/EditablePrefabsConfig" |
static const string | WORLD_NAME = "EditablePrefabsWorld" |
static const string | META_EXTENSION = ".meta" |
static const string | COPY_EXTENSION = "_copy" |
void EditablePrefabsConfig.EditablePrefabsConfig | ( | ) |
|
protected |
|
protected |
bool EditablePrefabsConfig.CreateDirectoryFor | ( | out string | filePath, |
string | addon = "" |
||
) |
Create a directory for editable entity prefab on given path.
[in] | filePath | prefab path |
[in] | addon |
void EditablePrefabsConfig.CreateEditablePrefab | ( | WorldEditorAPI | api, |
ResourceName | prefab, | ||
bool | onlyUpdate = false , |
||
map< string, SCR_EEditablePrefabResult > | results = null |
||
) |
Create or update editable entity prefab.
[in] | api | World Editor API |
[in] | prefab | Source prefab |
— Not in 'Auto' folder
bool EditablePrefabsConfig.CreateWorld | ( | ) |
Create empty world which can be safely edited.
|
protected |
Delete existing editable prefab.
|
protected |
|
static |
Get config from a prefab.
[in] | configPath | prefab |
bool EditablePrefabsConfig.GetLinkFromSource | ( | string | guid, |
out ResourceName | linkedPrefab = ResourceName::Empty |
||
) |
Get a link from a prefab to its editable prefab.
[in] | guid | prefab GUID |
[out] | linkedPrefab | found prefab |
bool EditablePrefabsConfig.GetLinkFromTarget | ( | string | guid, |
out ResourceName | linkedPrefab = ResourceName::Empty |
||
) |
Get a link from editable prefab to its source prefab.
[in] | guid | prefab GUID |
[out] | linkedPrefab | found prefab |
void EditablePrefabsConfig.GetLinks | ( | bool | forced = false | ) |
Initialise links to and from editable prefabs.
[in] | forced |
string EditablePrefabsConfig.GetPrefix | ( | ) |
Get prefix added to editable entity prefabs.
|
protected |
|
protected |
string EditablePrefabsConfig.GetSourcePath | ( | ) |
Get source path.
ResourceName EditablePrefabsConfig.GetSourcePrefab | ( | ResourceName | prefab | ) |
Get source prefab of editable entity prefab.
[in] | prefab | Queried prefab |
string EditablePrefabsConfig.GetTargetPath | ( | ) |
Get raw target path.
string EditablePrefabsConfig.GetTargetPathAuto | ( | ) |
Get path of auto folder in target path.
|
protected |
bool EditablePrefabsConfig.IsEditableEntity | ( | ResourceName | prefab | ) |
Check if the prefab is an editable entity.
bool EditablePrefabsConfig.IsValid | ( | ) |
Check if the config is configured correctly.
void EditablePrefabsConfig.LogResults | ( | notnull map< string, SCR_EEditablePrefabResult > | results | ) |
Print auto-configuration results to log.
[in] | results | map of confired prefabs with their results |
|
protected |
Move existing editable prefab to a new path (includes also renaming the prefab)
[in] | prevPath | Current path |
[in] | newPath | New path |
bool EditablePrefabsConfig.MoveFile | ( | string | prevPath, |
string | newPath | ||
) |
Move a file and its meta file from one path to another.
[in] | prevPath | current path (without GUIDs) |
[in] | newPath | new path (without GUIDs) |
|
protected |
void EditablePrefabsConfig.UpdateEditablePrefab | ( | WorldEditorAPI | api, |
ResourceName | prefab | ||
) |
[in] | api | |
[in] | prefab |
string EditablePrefabsConfig.VerifyEditablePrefab | ( | WorldEditorAPI | api, |
ResourceName | prefab, | ||
bool | onlyFileChanges = false |
||
) |
[in] | api | |
[in] | prefab | |
[in] | onlyFileChanges |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |