Plugin Helpers

Some useful functions for ULib plugins to use for doing plugin-type things.

Summary
Plugin HelpersSome useful functions for ULib plugins to use for doing plugin-type things.
Tables
pluginsHolds plugin data for plugins that have registered themselves with ULib.
Functions
registerPlugin
pluginVersionStrReturns a human-readable version string for plugins in a consistent format.
updateCheckCheck for updates for a named plugin at a given URL (usually you will want to use the URL specified in registerPlugin).

Tables

plugins

Holds plugin data for plugins that have registered themselves with ULib.

Fields

NameA string of the name of the plugin.
VersionA string or number of the version of the plugin.
IsReleaseAn optional boolean specifying if this is a release (non-beta) version
AuthorAn optional string of the author of the plugin.
URLAn optional string of the URL for the plugin.
WorkshopIDAn optional number specifying the workshopid for the plugin.
BuildNumLocalAn optional number specifying the build number for this plugin.
BuildHiddenAn optional boolean; if true, the build is not shown in the version string.
BuildNumRemoteURLAn optional string specifying the URL to visit to retrieve the latest published build number for the plugin.
BuildNumRemoteReceivedCallbackAn optional function to callback when the latest published build number is received.
WorkshopMountedA generated boolean which is true only if WorkshopID was specified and that ID is currently mounted.
BuildNumRemoteA generated number of the retrieved latest published build number.

Functions

registerPlugin

function ULib.registerPlugin(pluginData)

Parameters

pluginDataA table of plugin data in the format documented in plugins, above.

pluginVersionStr

function ULib.pluginVersionStr(name)

Returns a human-readable version string for plugins in a consistent format.  The string tells users if they’re using a development build (with build number/date), workshop, or release version.

Parameters

nameThe string of the plugin name you are querying about.

Returns

A string of the version information for the specified plugin.

updateCheck

function ULib.updateCheck(name,
url)

Check for updates for a named plugin at a given URL (usually you will want to use the URL specified in registerPlugin).  Note that this is an asynchronous check.

Parameters

nameThe name of the plugin.
urlThe URL to check.
function ULib.registerPlugin(pluginData)
function ULib.pluginVersionStr(name)
Returns a human-readable version string for plugins in a consistent format.
function ULib.updateCheck(name,
url)
Check for updates for a named plugin at a given URL (usually you will want to use the URL specified in registerPlugin).
Holds plugin data for plugins that have registered themselves with ULib.
Close