Appearance
LibTSMComponent
Inherits: Class
Methods
AddDependency
lua
function LibTSMComponent:AddDependency(name)
-> selfAdds a component as a dependency of the current component.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The name of the component |
Returns:
| Type | Description |
|---|---|
self |
DefineClassType
lua
function LibTSMComponent:DefineClassType(name, parentClass, ...)
-> <T:Class>Creates a new class type and makes it available to other components.
Parameters:
| Name | Type | Description |
|---|---|---|
name | <T> | The name of the class |
parentClass | P | The parent class |
... | ClassProperties | Properties to define the class with |
Returns:
| Type | Description |
|---|---|
<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:
| Name | Type | Description |
|---|---|---|
name | <T> | The name of the class |
parentClass | P | The parent class |
... | ClassProperties | Properties to define the class with |
Returns:
| Type | Description |
|---|---|
<T:Class> |
From
lua
function LibTSMComponent:From(name)
-> LibTSMComponentReferenceRetrieves a component which the current component depends on.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The name of the component |
Returns:
| Type | Description |
|---|---|
LibTSMComponentReference |
Include
lua
function LibTSMComponent:Include(path)
-> <T>Returns an existing module.
Parameters:
| Name | Type | Description |
|---|---|---|
path | <T> | The path of the module |
Returns:
| Type | Description |
|---|---|
<T> |
IncludeClassType
lua
function LibTSMComponent:IncludeClassType(name)
-> <T>Returns a class type.
Parameters:
| Name | Type | Description |
|---|---|---|
name | <T> | The name of the class |
Returns:
| Type | Description |
|---|---|
<T> |
Init
lua
function LibTSMComponent:Init(path)
-> <T:LibTSMModule>Creates a new module and makes it available to other components.
Parameters:
| Name | Type | Description |
|---|---|---|
path | <T> | The path of the module |
Returns:
| Type | Description |
|---|---|
<T:LibTSMModule> |
InitInternal
lua
function LibTSMComponent:InitInternal(path)
-> <T:LibTSMModule>Creates a new module which is only available internally within the component.
Parameters:
| Name | Type | Description |
|---|---|---|
path | <T> | The path of the module |
Returns:
| Type | Description |
|---|---|
<T:LibTSMModule> |
Functions
GetTime
lua
function LibTSMComponent.GetTime()
-> numberGets the current time value (or 0 if no function is registered).
Returns:
| Type | Description |
|---|---|
number |
GetVersionStr
lua
function LibTSMComponent.GetVersionStr()
-> stringGets the version string.
Returns:
| Type | Description |
|---|---|
string |
IsBCClassic
lua
function LibTSMComponent.IsBCClassic()
-> booleanReturns whether or not we're running within the Burning Crusade Classic version of the game.
Returns:
| Type | Description |
|---|---|
boolean |
IsDevVersion
lua
function LibTSMComponent.IsDevVersion()
-> booleanGets whether or not this is a dev version.
Returns:
| Type | Description |
|---|---|
boolean |
IsMistsClassic
lua
function LibTSMComponent.IsMistsClassic()
-> booleanReturns whether or not we're running within the Mists Classic version of the game.
Returns:
| Type | Description |
|---|---|
boolean |
IsRetail
lua
function LibTSMComponent.IsRetail()
-> booleanReturns whether or not we're running within the retail version of the game.
Returns:
| Type | Description |
|---|---|
boolean |
IsTestVersion
lua
function LibTSMComponent.IsTestVersion()
-> booleanGets whether or not this is a test version.
Returns:
| Type | Description |
|---|---|
boolean |
IsVanillaClassic
lua
function LibTSMComponent.IsVanillaClassic()
-> booleanReturns whether or not we're running within the Vanilla Classic version of the game.
Returns:
| Type | Description |
|---|---|
boolean |