roblox_emulator: add :connect alias to ScriptSignal.Connect
This commit is contained in:
@ -98,12 +98,9 @@ impl ScriptConnection{
|
|||||||
|
|
||||||
impl mlua::UserData for ScriptSignal{
|
impl mlua::UserData for ScriptSignal{
|
||||||
fn add_methods<M:mlua::UserDataMethods<Self>>(methods:&mut M){
|
fn add_methods<M:mlua::UserDataMethods<Self>>(methods:&mut M){
|
||||||
methods.add_method("Connect",|_lua,this,f:mlua::Function|
|
methods.add_method("connect",|_lua,this,f:mlua::Function|Ok(this.connect(f)));
|
||||||
Ok(this.connect(f))
|
methods.add_method("Connect",|_lua,this,f:mlua::Function|Ok(this.connect(f)));
|
||||||
);
|
methods.add_method("Once",|_lua,this,f:mlua::Function|Ok(this.once(f)));
|
||||||
methods.add_method("Once",|_lua,this,f:mlua::Function|
|
|
||||||
Ok(this.once(f))
|
|
||||||
);
|
|
||||||
// Fire is not allowed to be called from Lua
|
// Fire is not allowed to be called from Lua
|
||||||
// methods.add_method("Fire",|_lua,this,args:mlua::MultiValue|
|
// methods.add_method("Fire",|_lua,this,args:mlua::MultiValue|
|
||||||
// Ok(this.fire(args))
|
// Ok(this.fire(args))
|
||||||
|
Reference in New Issue
Block a user