Skip to content

LibTSMComponent

Inherits: Class

Methods

AddDependency

lua
function LibTSMComponent:AddDependency(name)
  -> self

Adds a component as a dependency of the current component.

Parameters:

NameTypeDescription
namestringThe name of the component

Returns:

TypeDescription
self

DefineClassType

lua
function LibTSMComponent:DefineClassType(name, parentClass, ...)
  -> <T:Class>

Creates a new class type and makes it available to other components.

Parameters:

NameTypeDescription
name<T>The name of the class
parentClassPThe parent class
...ClassPropertiesProperties to define the class with

Returns:

TypeDescription
<T:Class>

DefineInternalClassType

lua
function LibTSMComponent:DefineInternalClassType(name, parentClass, ...)
  -> <T:Class>

Creates a new class type which is only available internally within the component.

Parameters:

NameTypeDescription
name<T>The name of the class
parentClassPThe parent class
...ClassPropertiesProperties to define the class with

Returns:

TypeDescription
<T:Class>

From

lua
function LibTSMComponent:From(name)
  -> LibTSMComponentReference

Retrieves a component which the current component depends on.

Parameters:

NameTypeDescription
namestringThe name of the component

Returns:

TypeDescription
LibTSMComponentReference

Include

lua
function LibTSMComponent:Include(path)
  -> <T>

Returns an existing module.

Parameters:

NameTypeDescription
path<T>The path of the module

Returns:

TypeDescription
<T>

IncludeClassType

lua
function LibTSMComponent:IncludeClassType(name)
  -> <T>

Returns a class type.

Parameters:

NameTypeDescription
name<T>The name of the class

Returns:

TypeDescription
<T>

Init

lua
function LibTSMComponent:Init(path)
  -> <T:LibTSMModule>

Creates a new module and makes it available to other components.

Parameters:

NameTypeDescription
path<T>The path of the module

Returns:

TypeDescription
<T:LibTSMModule>

InitInternal

lua
function LibTSMComponent:InitInternal(path)
  -> <T:LibTSMModule>

Creates a new module which is only available internally within the component.

Parameters:

NameTypeDescription
path<T>The path of the module

Returns:

TypeDescription
<T:LibTSMModule>

Functions

GetTime

lua
function LibTSMComponent.GetTime()
  -> number

Gets the current time value (or 0 if no function is registered).

Returns:

TypeDescription
number

GetVersionStr

lua
function LibTSMComponent.GetVersionStr()
  -> string

Gets the version string.

Returns:

TypeDescription
string

IsBCClassic

lua
function LibTSMComponent.IsBCClassic()
  -> boolean

Returns whether or not we're running within the Burning Crusade Classic version of the game.

Returns:

TypeDescription
boolean

IsDevVersion

lua
function LibTSMComponent.IsDevVersion()
  -> boolean

Gets whether or not this is a dev version.

Returns:

TypeDescription
boolean

IsMistsClassic

lua
function LibTSMComponent.IsMistsClassic()
  -> boolean

Returns whether or not we're running within the Mists Classic version of the game.

Returns:

TypeDescription
boolean

IsRetail

lua
function LibTSMComponent.IsRetail()
  -> boolean

Returns whether or not we're running within the retail version of the game.

Returns:

TypeDescription
boolean

IsTestVersion

lua
function LibTSMComponent.IsTestVersion()
  -> boolean

Gets whether or not this is a test version.

Returns:

TypeDescription
boolean

IsVanillaClassic

lua
function LibTSMComponent.IsVanillaClassic()
  -> boolean

Returns whether or not we're running within the Vanilla Classic version of the game.

Returns:

TypeDescription
boolean