|
static array< string > | GetResourceAddons (ResourceName prefab, bool ignoreCoreAddons=false) |
| Returns an array of addons where given resource is present or modified.
|
|
static string | GetResourceLastAddon (ResourceName prefab) |
| Returns last addon where given resource is present.
|
|
static string | GetAddonIndex (int index) |
|
static string | GetAddonID (int index) |
| Get addon name by providing index of the addon.
|
|
static array< string > | GetAllAddonIDs () |
|
static string | GetAddonFileSystem (int addonIndex) |
|
static array< string > | GetAllAddonFileSystems () |
|
static string | StripFileSystem (string fileSystemPath) |
| Return the FileSystem prefix-stripped path e.g from $ArmaReforger:scripts/Game/Global/SCR_AddonTools.c to scripts/Game/Global/SCR_AddonTools.c $abc:test -> test $:test -> test :test -> :test $abc -> $abc $abc: -> <empty string>
|
|
static string | ToFileSystem (string addon) |
| Convert addon name to file system format.
|
|
static bool | GetAddonAbsolutePath (int addonId, string relativeDirPath, out string result, bool mustExist=true) |
| Return the absolute path (without a trailing '/')
|
|
static bool | GetAddonAbsolutePath (int addonId, ResourceName directory, out string result, bool mustExist=true) |
| Return the absolute path (without a trailing '/')
|
|
|
static const ref array< string > | CORE_ADDONS = { "core", "ArmaReforger" } |
|
◆ GetAddonAbsolutePath() [1/2]
static bool SCR_AddonTool.GetAddonAbsolutePath |
( |
int | addonId, |
|
|
ResourceName | directory, |
|
|
out string | result, |
|
|
bool | mustExist = true ) |
|
static |
Return the absolute path (without a trailing '/')
- Parameters
-
[in] | addonId | |
[in] | directory | a directory resourceName should be provided\ if a -file- ResourceName is provided, the xxx.yyy part WILL be part of the provided directory so use FilePath.StripFileName if not wanted |
[out] | result | |
[in] | mustExist | |
- Returns
- true on success, false on failure
◆ GetAddonAbsolutePath() [2/2]
static bool SCR_AddonTool.GetAddonAbsolutePath |
( |
int | addonId, |
|
|
string | relativeDirPath, |
|
|
out string | result, |
|
|
bool | mustExist = true ) |
|
static |
Return the absolute path (without a trailing '/')
- Parameters
-
[in] | addonId | |
[in] | relativeDirPath | if a directory resourceName is provided, use resourceName.GetPath() |
[out] | result | |
[in] | mustExist | |
- Returns
- true on success, false on failure
◆ GetAddonFileSystem()
static string SCR_AddonTool.GetAddonFileSystem |
( |
int | addonIndex | ) |
|
|
static |
- Parameters
-
- Returns
- addon file system, e.g "$core:", "$ArmaReforger:" etc
◆ GetAddonID()
static string SCR_AddonTool.GetAddonID |
( |
int | index | ) |
|
|
static |
Get addon name by providing index of the addon.
Can be used in tandem with ParamEnumAddons.
- Parameters
-
- Returns
- Addon ID
◆ GetAddonIndex()
static string SCR_AddonTool.GetAddonIndex |
( |
int | index | ) |
|
|
static |
◆ GetAllAddonFileSystems()
static array< string > SCR_AddonTool.GetAllAddonFileSystems |
( |
| ) |
|
|
static |
- Returns
- addon IDs (format "$core:", "$ArmaReforger:" etc)
◆ GetAllAddonIDs()
static array< string > SCR_AddonTool.GetAllAddonIDs |
( |
| ) |
|
|
static |
- Returns
- addon IDs (format "core", "ArmaReforger" etc)
◆ GetResourceAddons()
static array< string > SCR_AddonTool.GetResourceAddons |
( |
ResourceName | prefab, |
|
|
bool | ignoreCoreAddons = false ) |
|
static |
Returns an array of addons where given resource is present or modified.
- Parameters
-
[in] | prefab | Prefab path |
[in] | ignoreCoreAddons | if true then ArmaReforger and Core are ignored unless no other addons are found |
- Returns
- array of addon ID strings
◆ GetResourceLastAddon()
static string SCR_AddonTool.GetResourceLastAddon |
( |
ResourceName | prefab | ) |
|
|
static |
Returns last addon where given resource is present.
- Parameters
-
- Returns
- class name
◆ StripFileSystem()
static string SCR_AddonTool.StripFileSystem |
( |
string | fileSystemPath | ) |
|
|
static |
Return the FileSystem prefix-stripped path e.g from $ArmaReforger:scripts/Game/Global/SCR_AddonTools.c to scripts/Game/Global/SCR_AddonTools.c $abc:test -> test $:test -> test :test -> :test $abc -> $abc $abc: -> <empty string>
- Parameters
-
- Returns
- path without addon prefix, or untouched provided path if the format is wrong (proper format = $addonName:somethingElse)
◆ ToFileSystem()
static string SCR_AddonTool.ToFileSystem |
( |
string | addon | ) |
|
|
static |
Convert addon name to file system format.
For instance, "ArmaReforger" will get converted to "$ArmaReforger:".
- Parameters
-
- Returns
- addon name or empty string on wrong input
◆ CORE_ADDONS
const ref array<string> SCR_AddonTool.CORE_ADDONS = { "core", "ArmaReforger" } |
|
staticprotected |
The documentation for this interface was generated from the following file:
- Game/Global/SCR_AddonTools.c