mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Expose the signals for the loading stages.
This commit is contained in:
parent
c5b509dcb3
commit
76759118cc
@ -817,6 +817,30 @@ public:
|
|||||||
return m_CircularLocks;
|
return m_CircularLocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Retrieve the preload signal if not complete.
|
||||||
|
*/
|
||||||
|
LightObj & GetPreLoadEvent()
|
||||||
|
{
|
||||||
|
return m_LockPreLoadSignal ? NullLightObj() : mOnPreLoad.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Retrieve the postload signal if not complete.
|
||||||
|
*/
|
||||||
|
LightObj & GetPostLoadEvent()
|
||||||
|
{
|
||||||
|
return m_LockPostLoadSignal ? NullLightObj() : mOnPostLoad.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Retrieve the unload signal if not complete.
|
||||||
|
*/
|
||||||
|
LightObj & GetUnloadEvent()
|
||||||
|
{
|
||||||
|
return m_LockUnloadSignal ? NullLightObj() : mOnUnload.second;
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* See if certain circular locks are enabled.
|
* See if certain circular locks are enabled.
|
||||||
*/
|
*/
|
||||||
|
@ -50,6 +50,24 @@ static SQInteger SqGetEvents(HSQUIRRELVM vm)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
static LightObj & SqGetPreLoadEvent()
|
||||||
|
{
|
||||||
|
return Core::Get().GetPreLoadEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
static LightObj & SqGetPostLoadEvent()
|
||||||
|
{
|
||||||
|
return Core::Get().GetPostLoadEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
static LightObj & SqGetUnloadEvent()
|
||||||
|
{
|
||||||
|
return Core::Get().GetUnloadEvent();
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
static bool SqGetReloadStatus()
|
static bool SqGetReloadStatus()
|
||||||
{
|
{
|
||||||
@ -304,6 +322,9 @@ void Register_Core(HSQUIRRELVM vm)
|
|||||||
.Func(_SC("DestroyObject"), &DelObject)
|
.Func(_SC("DestroyObject"), &DelObject)
|
||||||
.Func(_SC("DestroyPickup"), &DelPickup)
|
.Func(_SC("DestroyPickup"), &DelPickup)
|
||||||
.Func(_SC("DestroyVehicle"), &DelVehicle)
|
.Func(_SC("DestroyVehicle"), &DelVehicle)
|
||||||
|
.Func(_SC("OnPreLoad"), &SqGetPreLoadEvent)
|
||||||
|
.Func(_SC("OnPostLoad"), &SqGetPostLoadEvent)
|
||||||
|
.Func(_SC("OnUnload"), &SqGetUnloadEvent)
|
||||||
.SquirrelFunc(_SC("LoadScript"), &SqLoadScript)
|
.SquirrelFunc(_SC("LoadScript"), &SqLoadScript)
|
||||||
.SquirrelFunc(_SC("On"), &SqGetEvents)
|
.SquirrelFunc(_SC("On"), &SqGetEvents)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user