mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-06 08:57:11 +02:00
Expose functionality to emit custom entity events.
This commit is contained in:
@ -121,6 +121,15 @@ void CPickup::BindEvent(Int32 evid, Object & env, Function & func) const
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPickup::CustomEvent(Int32 header, Object & payload) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Perfrom the requested action
|
||||
Core::Get().EmitPickupCustom(m_ID, header, payload);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CPickup::IsStreamedFor(CPlayer & player) const
|
||||
{
|
||||
@ -385,6 +394,7 @@ void Register_CPickup(HSQUIRRELVM vm)
|
||||
.Prop(_SC("Active"), &CPickup::IsActive)
|
||||
// Core Methods
|
||||
.Func(_SC("Bind"), &CPickup::BindEvent)
|
||||
.Func(_SC("CustomEvent"), &CPickup::CustomEvent)
|
||||
// Core Overloads
|
||||
.Overload< bool (CPickup::*)(void) >(_SC("Destroy"), &CPickup::Destroy)
|
||||
.Overload< bool (CPickup::*)(Int32) >(_SC("Destroy"), &CPickup::Destroy)
|
||||
|
Reference in New Issue
Block a user