(optional) a FireTongue instance for Polymod to hook into for localization support

Constructor

Variables

@:value("assets/")read onlyassetPrefix:String = "assets/"

read onlybackend:IBackend

@:value(null)dirs:Array<String> = null

@:value(null)ignoredFiles:Array<String> = null

Methods

@:value({ type : null })check(id:String, ?type:PolymodAssetType):Bool

Check if the given asset exists in the file system (If using multiple mods, it will return true if ANY of the mod folders contains this file) @return

Parameters:

id

@:value({ dir : "" })checkDirectly(id:String, dir:String = ""):Bool

@:value({ theDir : "" })file(id:String, theDir:String = ""):String

Get the filename of the given asset id (If using multiple mods, it will check all the mod folders for this file, and return the LAST one found) @return

Parameters:

id

fileLocale(id:String):String

Get the filename of the given asset id, with the given locale prefix prepended. (will ignore all installed mods)

@:value({ directory : "" })getTextDirectly(id:String, directory:String = ""):String

Get text without consideration of any modifications @return

Parameters:

id
theDir

@:value({ type : null })list(?type:PolymodAssetType):Array<String>

@:value({ type : null })listModFiles(?type:PolymodAssetType):Array<String>

prependAssetsPrefix(id:String):String

Add the assets/ prefix to a file path, if it isn't present. If your app uses a different asset path prefix, you can override this with the assetPrefix parameter.

Parameters:

id

The path to prepend

Returns:

The modified path

stripAssetsPrefix(id:String):String

Strip the assets/ prefix from a file path, if it is present. If your app uses a different asset path prefix, you can override this with the assetPrefix parameter.

Parameters:

id

The path to strip.

Returns:

The modified path