#cp.ids
Allows managing values/IDs which can vary between versions.
#API Overview
Functions - API calls offered directly by the extension
Methods - API calls which can only be made on an object returned by a constructor
#API Documentation
#Functions
Signature | cp.ids.new(path[, currentVersionFn]) -> cp.ids |
Type | Function |
Description | Creates a new ids instance with the specified path to the version files and a function to find the current version, if appropriate. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 41 |
#Methods
Signature | cp.ids:currentVersion() -> semver |
Type | Method |
Description | Returns the current version number for the IDs library. May be nil . |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 61 |
Signature | cp.ids:load([version]) -> table |
Type | Method |
Description | Loads and caches IDs for the given version. It will search through previous versions, with each subsequent version file overriding the previous version's value, if present. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 135 |
Signature | cp.ids:of(version, subset) -> function |
Type | Method |
Description | Returns a function which can be called to retrieve a specific value for the specified version. |
Parameters |
|
Returns |
|
Notes |
|
Examples | None |
Source | src/extensions/cp/ids/init.lua line 187 |
Signature | cp.ids:ofCurrent(subset) -> function |
Type | Method |
Description | Returns a function which can be called with an ID to retrieve a specific value for the current version. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 213 |
Signature | cp.ids:previousVersion([version]) -> semver |
Type | Method |
Description | Returns the previous version number that has stored IDs. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 104 |
Signature | cp.ids:versions() -> table |
Type | Method |
Description | Returns a table of versions. |
Parameters |
|
Returns |
|
Notes | None |
Examples | None |
Source | src/extensions/cp/ids/init.lua line 74 |