mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-07-09 01:57:09 +02:00
Expose functionality to emit custom entity events.
This commit is contained in:
@@ -116,6 +116,15 @@ void CKeybind::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CKeybind::CustomEvent(Int32 header, Object & payload) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Perfrom the requested action
|
||||
Core::Get().EmitKeybindCustom(m_ID, header, payload);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CKeybind::GetFirst() const
|
||||
{
|
||||
@@ -203,6 +212,7 @@ void Register_CKeybind(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Active"), &CKeybind::IsActive)
|
||||
// Core Methods
|
||||
.Func(_SC("Bind"), &CKeybind::BindEvent)
|
||||
.Func(_SC("CustomEvent"), &CKeybind::CustomEvent)
|
||||
// Core Overloads
|
||||
.Overload< bool (CKeybind::*)(void) >(_SC("Destroy"), &CKeybind::Destroy)
|
||||
.Overload< bool (CKeybind::*)(Int32) >(_SC("Destroy"), &CKeybind::Destroy)
|
||||
|
||||
Reference in New Issue
Block a user