Static variables
staticonError:PolymodError ‑> Void = null
The callback function for any errors or notices generated by Polymod.
Populate this by calling init({errorCallback = myCallback})
.
Static methods
staticdisable():Void
Fully disables Polymod and disables any asset replacements, from mods or from locales.
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
staticgetDefaultIgnoreList():Array<String>
Builds the list of files which Polymod will ignore, by default, when loading mods. Includes license files and metadata files.
Returns:
A list of filenames.
staticgetFileSystem():IFileSystem
Retrieve the IFileSystem instance currently in use by Polymod. This may be useful if you're using a MemoryFileSystem or a custom file system that you want to call functions on.
staticinit(params:PolymodParams):Array<ModMetadata>
Initializes Polymod, while loading the chosen mod or mods.
Parameters:
params | A set of parameters to use when initializing Polymod. |
---|
Returns:
An array of metadata entries for the mods which were successfully loaded.
staticlistModFiles(?type:PolymodAssetType):Array<String>
Provide a list of assets included in or modified by the mod(s)
Parameters:
type | the type of asset you want (lime.utils.PolymodAssetType) |
---|
Returns:
Array
staticloadMod(modId:String):Array<ModMetadata>
Reinitializes Polymod (with the same parameters) while additionally enabling an individual mod. The new mod will get added to the end of the modlist (unless mod dependencies require otherwise).
Depending on the framework you are using, especially if you loaded a specific file already,
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.
staticloadMods(modIds:Array<String>):Array<ModMetadata>
Reinitializes Polymod (with the same parameters) while additionally enabling several mods. The new mods will get added to the end of the modlist (unless mod dependencies require otherwise).
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.
staticloadOnlyMods(modIds:Array<String>):Array<ModMetadata>
Reinitializes Polymod (with the same parameters) while enabling a list of mods. The new modlist will replace the old modlist.
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.
staticreload():Array<ModMetadata>
Reinitializes Polymod, with the same parameters. Useful to force Polymod to detect newly added files.
Depending on the framework you are using, especially if you loaded a specific file already,
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.
staticscan(?scanParams:Null<ScanParams>):Array<ModMetadata>
Scan the given directory for available mods and returns their metadata entries. Note that if Polymod is already initialized, all parameters are ignored and optional.
Parameters:
modRoot | (optional) root directory of all mods. Optional if Polymod is initialized. |
---|---|
apiVersionRule | (optional) enforce a modding API version rule -- incompatible mods will not be returned |
errorCallback | (optional) callback for any errors generated during scanning |
Returns:
Array
staticunloadAllMods():Void
Reinitializes Polymod (with the same parameters) while turning off all mods. If you are using Firetongue integration, localized asset replacements will still apply.
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
staticunloadMod(modId:String):Array<ModMetadata>
Reinitializes Polymod (with the same parameters) while additionally disabling an individual mod. The specified mod will get removed from the modlist. If the unloaded mod was a dependency, depending on your configuration, either dependent mods will also be disabled, or Polymod will throw an error and unload nothing.
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.
staticunloadMods(modIds:Array<String>):Array<ModMetadata>
Reinitializes Polymod (with the same parameters) while additionally disabling several mods. The specified mods will get removed from the modlist. If the unloaded mods were dependencies, depending on your configuration, either dependent mods will also be disabled, or Polymod will throw an error and unload nothing.
Depending on the framework you are using, especially if you loaded a specific file already.
you may have to call clearCache()
for this to take effect.
Returns:
A list of all mods that were successfully loaded.