Barotrauma Client Doc
Barotrauma.LuaCsHook Class Reference

Classes

class  ParameterTable
 

Public Types

enum class  HookMethodType { Before , After }
 

Public Member Functions

void Initialize ()
 
void Add (string name, string identifier, LuaCsFunc func, ACsMod owner=null)
 
bool Exists (string name, string identifier)
 
void Remove (string name, string identifier)
 
void Clear ()
 
Call< T > (string name, params object[] args)
 
object Call (string name, params object[] args)
 
string Patch (string identifier, string className, string methodName, string[] parameterTypes, LuaCsPatchFunc patch, HookMethodType hookType=HookMethodType.Before)
 
string Patch (string identifier, string className, string methodName, LuaCsPatchFunc patch, HookMethodType hookType=HookMethodType.Before)
 
string Patch (string className, string methodName, string[] parameterTypes, LuaCsPatchFunc patch, HookMethodType hookType=HookMethodType.Before)
 
string Patch (string className, string methodName, LuaCsPatchFunc patch, HookMethodType hookType=HookMethodType.Before)
 
bool RemovePatch (string identifier, string className, string methodName, string[] parameterTypes, HookMethodType hookType)
 
bool RemovePatch (string identifier, string className, string methodName, HookMethodType hookType)
 
void HookMethod (string identifier, MethodBase method, LuaCsCompatPatchFunc patch, HookMethodType hookType=HookMethodType.Before, ACsMod owner=null)
 
void UnhookMethod (string identifier, MethodBase method, HookMethodType hookType=HookMethodType.Before)
 

Protected Member Functions

void HookMethod (string identifier, string className, string methodName, string[] parameterNames, LuaCsCompatPatchFunc patch, HookMethodType hookMethodType=HookMethodType.Before)
 
void HookMethod (string identifier, string className, string methodName, LuaCsCompatPatchFunc patch, HookMethodType hookMethodType=HookMethodType.Before)
 
void HookMethod (string className, string methodName, LuaCsCompatPatchFunc patch, HookMethodType hookMethodType=HookMethodType.Before)
 
void HookMethod (string className, string methodName, string[] parameterNames, LuaCsCompatPatchFunc patch, HookMethodType hookMethodType=HookMethodType.Before)
 
void UnhookMethod (string identifier, string className, string methodName, string[] parameterNames, HookMethodType hookType=HookMethodType.Before)
 

Detailed Description

Definition at line 413 of file LuaCsHook.cs.

Member Enumeration Documentation

◆ HookMethodType

Enumerator
Before 
After 

Definition at line 415 of file LuaCsHook.cs.

Member Function Documentation

◆ Add()

void Barotrauma.LuaCsHook.Add ( string  name,
string  identifier,
LuaCsFunc  func,
ACsMod  owner = null 
)

Definition at line 692 of file LuaCsHook.cs.

◆ Call()

object Barotrauma.LuaCsHook.Call ( string  name,
params object[]  args 
)

◆ Call< T >()

T Barotrauma.LuaCsHook.Call< T > ( string  name,
params object[]  args 
)

Definition at line 766 of file LuaCsHook.cs.

◆ Clear()

void Barotrauma.LuaCsHook.Clear ( )

Definition at line 739 of file LuaCsHook.cs.

◆ Exists()

bool Barotrauma.LuaCsHook.Exists ( string  name,
string  identifier 
)

Definition at line 709 of file LuaCsHook.cs.

◆ HookMethod() [1/5]

void Barotrauma.LuaCsHook.HookMethod ( string  className,
string  methodName,
LuaCsCompatPatchFunc  patch,
HookMethodType  hookMethodType = HookMethodType.Before 
)
protected

◆ HookMethod() [2/5]

void Barotrauma.LuaCsHook.HookMethod ( string  className,
string  methodName,
string[]  parameterNames,
LuaCsCompatPatchFunc  patch,
HookMethodType  hookMethodType = HookMethodType.Before 
)
protected

◆ HookMethod() [3/5]

void Barotrauma.LuaCsHook.HookMethod ( string  identifier,
MethodBase  method,
LuaCsCompatPatchFunc  patch,
HookMethodType  hookType = HookMethodType.Before,
ACsMod  owner = null 
)

Definition at line 124 of file LuaCsHookCompat.cs.

◆ HookMethod() [4/5]

void Barotrauma.LuaCsHook.HookMethod ( string  identifier,
string  className,
string  methodName,
LuaCsCompatPatchFunc  patch,
HookMethodType  hookMethodType = HookMethodType.Before 
)
protected

◆ HookMethod() [5/5]

void Barotrauma.LuaCsHook.HookMethod ( string  identifier,
string  className,
string  methodName,
string[]  parameterNames,
LuaCsCompatPatchFunc  patch,
HookMethodType  hookMethodType = HookMethodType.Before 
)
protected

Definition at line 200 of file LuaCsHookCompat.cs.

◆ Initialize()

void Barotrauma.LuaCsHook.Initialize ( )

Definition at line 591 of file LuaCsHook.cs.

◆ Patch() [1/4]

string Barotrauma.LuaCsHook.Patch ( string  className,
string  methodName,
LuaCsPatchFunc  patch,
HookMethodType  hookType = HookMethodType.Before 
)

Definition at line 1285 of file LuaCsHook.cs.

◆ Patch() [2/4]

string Barotrauma.LuaCsHook.Patch ( string  className,
string  methodName,
string[]  parameterTypes,
LuaCsPatchFunc  patch,
HookMethodType  hookType = HookMethodType.Before 
)

Definition at line 1279 of file LuaCsHook.cs.

◆ Patch() [3/4]

string Barotrauma.LuaCsHook.Patch ( string  identifier,
string  className,
string  methodName,
LuaCsPatchFunc  patch,
HookMethodType  hookType = HookMethodType.Before 
)

Definition at line 1273 of file LuaCsHook.cs.

◆ Patch() [4/4]

string Barotrauma.LuaCsHook.Patch ( string  identifier,
string  className,
string  methodName,
string[]  parameterTypes,
LuaCsPatchFunc  patch,
HookMethodType  hookType = HookMethodType.Before 
)

Definition at line 1267 of file LuaCsHook.cs.

◆ Remove()

void Barotrauma.LuaCsHook.Remove ( string  name,
string  identifier 
)

Definition at line 725 of file LuaCsHook.cs.

◆ RemovePatch() [1/2]

bool Barotrauma.LuaCsHook.RemovePatch ( string  identifier,
string  className,
string  methodName,
HookMethodType  hookType 
)

Definition at line 1316 of file LuaCsHook.cs.

◆ RemovePatch() [2/2]

bool Barotrauma.LuaCsHook.RemovePatch ( string  identifier,
string  className,
string  methodName,
string[]  parameterTypes,
HookMethodType  hookType 
)

Definition at line 1310 of file LuaCsHook.cs.

◆ UnhookMethod() [1/2]

void Barotrauma.LuaCsHook.UnhookMethod ( string  identifier,
MethodBase  method,
HookMethodType  hookType = HookMethodType.Before 
)

Definition at line 218 of file LuaCsHookCompat.cs.

◆ UnhookMethod() [2/2]

void Barotrauma.LuaCsHook.UnhookMethod ( string  identifier,
string  className,
string  methodName,
string[]  parameterNames,
HookMethodType  hookType = HookMethodType.Before 
)
protected

Definition at line 229 of file LuaCsHookCompat.cs.