Mods
| Kind | class |
| Package | backend |
| Full name | backend.Mods |
| Source | source/backend/Mods.hx |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
currentModDirectory | String | yes | '' | — |
ignoreModFolders | Array<String> | yes | [ | — |
invalidMods | Array<String> | yes | [] | Folders of mods that were installed but whose data couldn't be parsed (invalid pack.json, broken achievements.json, ...). Used by the bad_mod achievement. |
updatedOnState | Bool | yes | false | — |
Public methods
getGlobalMods
static inline function getGlobalMods()
markInvalidMod
static function markInvalidMod(folder:String = null):Void
Registers a mod folder that contains invalid data and awards the bad_mod achievement.
@param folder Mod folder, defaults to the currently loaded mod.
| Parameter | Type | Default |
|---|---|---|
folder (optional) | String | null |
pushGlobalMods
static inline function pushGlobalMods()
getModDirectories
static inline function getModDirectories():Array<String>
mergeAllTextsNamed
static inline function mergeAllTextsNamed(path:String, defaultDirectory:String = null, allowDuplicates:Bool = false)
| Parameter | Type | Default |
|---|---|---|
path | String | — |
defaultDirectory (optional) | String | null |
allowDuplicates (optional) | Bool | false |
directoriesWithFile
static inline function directoriesWithFile(path:String, fileToFind:String, mods:Bool = true)
| Parameter | Type | Default |
|---|---|---|
path | String | — |
fileToFind | String | — |
mods (optional) | Bool | true |
getPack
static function getPack(folder:String = null):Dynamic
| Parameter | Type | Default |
|---|---|---|
folder (optional) | String | null |
parseList
static inline function parseList():ModsList
loadTopMod
static function loadTopMod()
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
globalMods | Array<String> | yes |
| Method |
|---|
static function updateModList() |