mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-20 17:17:13 +02:00
Implemented BasicEvent type.
This commit is contained in:
1920
source/Event/Basic.cpp
Normal file
1920
source/Event/Basic.cpp
Normal file
File diff suppressed because it is too large
Load Diff
788
source/Event/Basic.hpp
Normal file
788
source/Event/Basic.hpp
Normal file
@ -0,0 +1,788 @@
|
||||
#ifndef _SQMOD_EVENT_BASIC_HPP_
|
||||
#define _SQMOD_EVENT_BASIC_HPP_
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Common.hpp"
|
||||
#include "Shared.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <chrono>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
class BasicEvent
|
||||
{
|
||||
protected:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
typedef std::chrono::time_point<std::chrono::steady_clock> TimePoint;
|
||||
|
||||
public:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent(SQInt32 type) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent(SQInt32 type, bool suspended) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent(const BasicEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent(BasicEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
~BasicEvent();
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent & operator = (const BasicEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
BasicEvent & operator = (BasicEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator == (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator != (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator < (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator > (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator <= (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool operator >= (const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
operator bool () const noexcept
|
||||
{
|
||||
return (m_Type == EVT_UNKNOWN || m_Type >= EVT_COUNT);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
operator ! () const noexcept
|
||||
{
|
||||
return (m_Type == EVT_COUNT || m_Type >= EVT_COUNT);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 Cmp(const BasicEvent & o) const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
const SQChar * GetName() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 GetType() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
const SQChar * GetTag() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetTag(const SQChar * tag) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SqObj & GetData() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetData(SqObj & data) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInteger GetIdle() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetIdle(SQInteger millis) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool IsIdle() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 GetStride() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetStride(SQInt32 stride) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 GetIgnore() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetIgnore(SQInt32 ignore) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 GetPrimary() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetPrimary(SQInt32 subset) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
SQInt32 GetSecondary() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetSecondary(SQInt32 subset) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool GetSuspended() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetSuspended(bool toggle) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
Function GetOnTrigger() const noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SetOnTrigger(const Function & func) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void BlipCreated(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CheckpointCreated(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void KeybindCreated(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ObjectCreated(SQInt32 object, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupCreated(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerCreated(SQInt32 player, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SphereCreated(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SpriteCreated(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void TextdrawCreated(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleCreated(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void BlipDestroyed(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CheckpointDestroyed(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void KeybindDestroyed(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ObjectDestroyed(SQInt32 object, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupDestroyed(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerDestroyed(SQInt32 player, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SphereDestroyed(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SpriteDestroyed(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void TextdrawDestroyed(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleDestroyed(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void BlipCustom(SQInt32 blip, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CheckpointCustom(SQInt32 checkpoint, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void KeybindCustom(SQInt32 keybind, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ObjectCustom(SQInt32 object, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupCustom(SQInt32 pickup, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerCustom(SQInt32 player, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SphereCustom(SQInt32 sphere, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SpriteCustom(SQInt32 sprite, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void TextdrawCustom(SQInt32 textdraw, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleCustom(SQInt32 vehicle, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerAway(SQInt32 player, bool status) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerGameKeys(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerRename(SQInt32 player, const SQChar * previous, const SQChar * current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerRequestClass(SQInt32 player, SQInt32 offset) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerRequestSpawn(SQInt32 player) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerSpawn(SQInt32 player) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerStartTyping(SQInt32 player) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerStopTyping(SQInt32 player) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerChat(SQInt32 player, const SQChar * message) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerCommand(SQInt32 player, const SQChar * command) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerMessage(SQInt32 player, SQInt32 receiver, const SQChar * message) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerHealth(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerArmour(SQInt32 player, SQFloat previous, SQFloat current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerWeapon(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerMove(SQInt32 player, const Vector3 & previous, const Vector3 & current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerWasted(SQInt32 player, SQInt32 reason) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerKilled(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerTeamKill(SQInt32 player, SQInt32 killer, SQInt32 reason, SQInt32 body_part) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerSpectate(SQInt32 player, SQInt32 target) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerCrashreport(SQInt32 player, const SQChar * report) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerBurning(SQInt32 player, bool state) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerCrouching(SQInt32 player, bool state) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerState(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PlayerAction(SQInt32 player, SQInt32 previous, SQInt32 current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateNone(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateNormal(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateShooting(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateDriver(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StatePassenger(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateEnterDriver(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateEnterPassenger(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateExitVehicle(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void StateUnspawned(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionNone(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionNormal(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionAiming(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionShooting(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionJumping(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionLieDown(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionGettingUp(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionJumpVehicle(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionDriving(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionDying(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionWasted(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionEmbarking(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ActionDisembarking(SQInt32 player, SQInt32 previous) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleRespawn(SQInt32 vehicle) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleExplode(SQInt32 vehicle) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleHealth(SQInt32 vehicle, SQFloat previous, SQFloat current) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleMove(SQInt32 vehicle, const Vector3 & previous, const Vector3 ¤t) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupRespawn(SQInt32 pickup) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void KeybindKeyPress(SQInt32 player, SQInt32 keybind) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void KeybindKeyRelease(SQInt32 player, SQInt32 keybind) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleEmbarking(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleEmbarked(SQInt32 player, SQInt32 vehicle, SQInt32 slot) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void VehicleDisembark(SQInt32 player, SQInt32 vehicle) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupClaimed(SQInt32 player, SQInt32 pickup) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void PickupCollected(SQInt32 player, SQInt32 pickup) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ObjectShot(SQInt32 player, SQInt32 object, SQInt32 weapon) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ObjectBump(SQInt32 player, SQInt32 object) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CheckpointEntered(SQInt32 player, SQInt32 checkpoint) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CheckpointExited(SQInt32 player, SQInt32 checkpoint) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SphereEntered(SQInt32 player, SQInt32 sphere) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void SphereExited(SQInt32 player, SQInt32 sphere) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ServerFrame(SQFloat delta) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ServerStartup() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ServerShutdown() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void InternalCommand(SQInt32 type, const SQChar * text) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void LoginAttempt(const SQChar * name, const SQChar * pass, const SQChar * addr) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void CustomEvent(SQInt32 group, SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void WorldOption(SQInt32 option, Object & value) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void WorldToggle(SQInt32 option, bool value) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void ScriptReload(SQInt32 header, Object & payload) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void LogMessage(SQInt32 type, const SQChar * message) noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
bool Trigger() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void Attach(EventType evt) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
void Detach(EventType evt) noexcept;
|
||||
|
||||
private:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
EventType m_Type;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
SQInt32 m_Stride;
|
||||
SQInt32 m_Ignore;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
SQInt32 m_Primary;
|
||||
SQInt32 m_Secondary;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
TimePoint m_Idle;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
Function m_OnTrigger;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
SqTag m_Tag;
|
||||
SqObj m_Data;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
bool m_Suspended;
|
||||
};
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
||||
#endif // _SQMOD_EVENT_BASIC_HPP_
|
70
source/Event/Global.cpp
Normal file
70
source/Event/Global.cpp
Normal file
@ -0,0 +1,70 @@
|
||||
#include "Event/Global.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::GlobalEvent() noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::GlobalEvent(SQInt32 type) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::GlobalEvent(SQInt32 type, bool suspended) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::GlobalEvent(const GlobalEvent & o) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::GlobalEvent(GlobalEvent && o) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent::~GlobalEvent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent & GlobalEvent::operator = (const GlobalEvent & o) noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
GlobalEvent & GlobalEvent::operator = (GlobalEvent && o) noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool Register_GlobalEvent(HSQUIRRELVM vm)
|
||||
{
|
||||
// Output debugging information
|
||||
LogDbg("Beginning registration of <GlobalEvent> type");
|
||||
// Attempt to register the specified type
|
||||
Sqrat::RootTable(vm).Bind(_SC("GlobalEvent"), Sqrat::Class< GlobalEvent >(vm, _SC("GlobalEvent"))
|
||||
.Ctor()
|
||||
);
|
||||
// Output debugging information
|
||||
LogDbg("Registration of <CAutomobile> type was successful");
|
||||
// Registration succeeded
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // Namespace:: SqMod
|
78
source/Event/Global.hpp
Normal file
78
source/Event/Global.hpp
Normal file
@ -0,0 +1,78 @@
|
||||
#ifndef _SQMOD_EVENT_GLOBAL_HPP_
|
||||
#define _SQMOD_EVENT_GLOBAL_HPP_
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Common.hpp"
|
||||
#include "Shared.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <chrono>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
class GlobalEvent
|
||||
{
|
||||
public:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent(SQInt32 type) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent(SQInt32 type, bool suspended) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent(const GlobalEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent(GlobalEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
~GlobalEvent();
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent & operator = (const GlobalEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
GlobalEvent & operator = (GlobalEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
};
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
||||
#endif // _SQMOD_EVENT_GLOBAL_HPP_
|
73
source/Event/Local.cpp
Normal file
73
source/Event/Local.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include "Event/Local.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::LocalEvent() noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::LocalEvent(SQInt32 type) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::LocalEvent(SQInt32 type, bool suspended) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::LocalEvent(const LocalEvent & o) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::LocalEvent(LocalEvent && o) noexcept
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent::~LocalEvent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent & LocalEvent::operator = (const LocalEvent & o) noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
LocalEvent & LocalEvent::operator = (LocalEvent && o) noexcept
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ================================================================================================
|
||||
bool Register_LocalEvent(HSQUIRRELVM vm)
|
||||
{
|
||||
// Output debugging information
|
||||
LogDbg("Beginning registration of <LocalEvent> type");
|
||||
// Attempt to register the specified type
|
||||
Sqrat::RootTable(vm).Bind(_SC("LocalEvent"), Sqrat::Class< LocalEvent >(vm, _SC("LocalEvent"))
|
||||
.Ctor()
|
||||
);
|
||||
// Output debugging information
|
||||
LogDbg("Registration of <CAutomobile> type was successful");
|
||||
// Registration succeeded
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // Namespace:: SqMod
|
78
source/Event/Local.hpp
Normal file
78
source/Event/Local.hpp
Normal file
@ -0,0 +1,78 @@
|
||||
#ifndef _SQMOD_EVENT_LOCAL_HPP_
|
||||
#define _SQMOD_EVENT_LOCAL_HPP_
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Common.hpp"
|
||||
#include "Shared.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include <chrono>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
class LocalEvent
|
||||
{
|
||||
public:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent() noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent(SQInt32 type) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent(SQInt32 type, bool suspended) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent(const LocalEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent(LocalEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
~LocalEvent();
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent & operator = (const LocalEvent & o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
LocalEvent & operator = (LocalEvent && o) noexcept;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
};
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
||||
#endif // _SQMOD_EVENT_LOCAL_HPP_
|
0
source/Event/Routine.cpp
Normal file
0
source/Event/Routine.cpp
Normal file
0
source/Event/Routine.hpp
Normal file
0
source/Event/Routine.hpp
Normal file
128
source/Event/Shared.cpp
Normal file
128
source/Event/Shared.cpp
Normal file
@ -0,0 +1,128 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Event/Shared.hpp"
|
||||
#include "Register.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * GetEventName(EventType evt)
|
||||
{
|
||||
switch (evt)
|
||||
{
|
||||
case EVT_BLIPCREATED: return _SC("Blip Created");
|
||||
case EVT_CHECKPOINTCREATED: return _SC("Checkpoint Created");
|
||||
case EVT_KEYBINDCREATED: return _SC("Keybind Created");
|
||||
case EVT_OBJECTCREATED: return _SC("Object Created");
|
||||
case EVT_PICKUPCREATED: return _SC("Pickup Created");
|
||||
case EVT_PLAYERCREATED: return _SC("Player Created");
|
||||
case EVT_SPHERECREATED: return _SC("Sphere Created");
|
||||
case EVT_SPRITECREATED: return _SC("Sprite Created");
|
||||
case EVT_TEXTDRAWCREATED: return _SC("Textdraw Created");
|
||||
case EVT_VEHICLECREATED: return _SC("Vehicle Created");
|
||||
case EVT_BLIPDESTROYED: return _SC("Blip Destroyed");
|
||||
case EVT_CHECKPOINTDESTROYED: return _SC("Checkpoint Destroyed");
|
||||
case EVT_KEYBINDDESTROYED: return _SC("Keybind Destroyed");
|
||||
case EVT_OBJECTDESTROYED: return _SC("Object Destroyed");
|
||||
case EVT_PICKUPDESTROYED: return _SC("Pickup Destroyed");
|
||||
case EVT_PLAYERDESTROYED: return _SC("Player Destroyed");
|
||||
case EVT_SPHEREDESTROYED: return _SC("Sphere Destroyed");
|
||||
case EVT_SPRITEDESTROYED: return _SC("Sprite Destroyed");
|
||||
case EVT_TEXTDRAWDESTROYED: return _SC("Textdraw Destroyed");
|
||||
case EVT_VEHICLEDESTROYED: return _SC("Vehicle Destroyed");
|
||||
case EVT_BLIPCUSTOM: return _SC("Blip Custom");
|
||||
case EVT_CHECKPOINTCUSTOM: return _SC("Checkpoint Custom");
|
||||
case EVT_KEYBINDCUSTOM: return _SC("Keybind Custom");
|
||||
case EVT_OBJECTCUSTOM: return _SC("Object Custom");
|
||||
case EVT_PICKUPCUSTOM: return _SC("Pickup Custom");
|
||||
case EVT_PLAYERCUSTOM: return _SC("Player Custom");
|
||||
case EVT_SPHERECUSTOM: return _SC("Sphere Custom");
|
||||
case EVT_SPRITECUSTOM: return _SC("Sprite Custom");
|
||||
case EVT_TEXTDRAWCUSTOM: return _SC("Textdraw Custom");
|
||||
case EVT_VEHICLECUSTOM: return _SC("Vehicle Custom");
|
||||
case EVT_PLAYERAWAY: return _SC("Player Away");
|
||||
case EVT_PLAYERGAMEKEYS: return _SC("Player Game Keys");
|
||||
case EVT_PLAYERRENAME: return _SC("Player Rename");
|
||||
case EVT_PLAYERREQUESTCLASS: return _SC("Player Request Class");
|
||||
case EVT_PLAYERREQUESTSPAWN: return _SC("Player Request Spawn");
|
||||
case EVT_PLAYERSPAWN: return _SC("Player Spawn");
|
||||
case EVT_PLAYERSTARTTYPING: return _SC("Player Start Typing");
|
||||
case EVT_PLAYERSTOPTYPING: return _SC("Player Stop Typing");
|
||||
case EVT_PLAYERCHAT: return _SC("Player Chat");
|
||||
case EVT_PLAYERCOMMAND: return _SC("Player Command");
|
||||
case EVT_PLAYERMESSAGE: return _SC("Player Message");
|
||||
case EVT_PLAYERHEALTH: return _SC("Player Health");
|
||||
case EVT_PLAYERARMOUR: return _SC("Player Armour");
|
||||
case EVT_PLAYERWEAPON: return _SC("Player Weapon");
|
||||
case EVT_PLAYERMOVE: return _SC("Player Move");
|
||||
case EVT_PLAYERWASTED: return _SC("Player Wasted");
|
||||
case EVT_PLAYERKILLED: return _SC("Player Killed");
|
||||
case EVT_PLAYERTEAMKILL: return _SC("Player Team Kill");
|
||||
case EVT_PLAYERSPECTATE: return _SC("Player Spectate");
|
||||
case EVT_PLAYERCRASHREPORT: return _SC("Player Crash Report");
|
||||
case EVT_PLAYERBURNING: return _SC("Player Burning");
|
||||
case EVT_PLAYERCROUCHING: return _SC("Player Crouching");
|
||||
case EVT_PLAYERSTATE: return _SC("Player State");
|
||||
case EVT_PLAYERACTION: return _SC("Player Action");
|
||||
case EVT_STATENONE: return _SC("State None");
|
||||
case EVT_STATENORMAL: return _SC("State Normal");
|
||||
case EVT_STATESHOOTING: return _SC("State Shooting");
|
||||
case EVT_STATEDRIVER: return _SC("State Driver");
|
||||
case EVT_STATEPASSENGER: return _SC("State Passenger");
|
||||
case EVT_STATEENTERDRIVER: return _SC("State Enter Driver");
|
||||
case EVT_STATEENTERPASSENGER: return _SC("State Enter Passenger");
|
||||
case EVT_STATEEXITVEHICLE: return _SC("State Exit Vehicle");
|
||||
case EVT_STATEUNSPAWNED: return _SC("State Unspawned");
|
||||
case EVT_ACTIONNONE: return _SC("Action None");
|
||||
case EVT_ACTIONNORMAL: return _SC("Action Normal");
|
||||
case EVT_ACTIONAIMING: return _SC("Action Aiming");
|
||||
case EVT_ACTIONSHOOTING: return _SC("Action Shooting");
|
||||
case EVT_ACTIONJUMPING: return _SC("Action Jumping");
|
||||
case EVT_ACTIONLIEDOWN: return _SC("Action Lie Down");
|
||||
case EVT_ACTIONGETTINGUP: return _SC("Action Getting Up");
|
||||
case EVT_ACTIONJUMPVEHICLE: return _SC("Action Jump Vehicle");
|
||||
case EVT_ACTIONDRIVING: return _SC("Action Driving");
|
||||
case EVT_ACTIONDYING: return _SC("Action Dying");
|
||||
case EVT_ACTIONWASTED: return _SC("Action Wasted");
|
||||
case EVT_ACTIONEMBARKING: return _SC("Action Embarking");
|
||||
case EVT_ACTIONDISEMBARKING: return _SC("Action Disembarking");
|
||||
case EVT_VEHICLERESPAWN: return _SC("Vehicle Respawn");
|
||||
case EVT_VEHICLEEXPLODE: return _SC("Vehicle Explode");
|
||||
case EVT_VEHICLEHEALTH: return _SC("Vehicle Health");
|
||||
case EVT_VEHICLEMOVE: return _SC("Vehicle Move");
|
||||
case EVT_PICKUPRESPAWN: return _SC("Pickup Respawn");
|
||||
case EVT_KEYBINDKEYPRESS: return _SC("Keybind Key Press");
|
||||
case EVT_KEYBINDKEYRELEASE: return _SC("Keybind Key Release");
|
||||
case EVT_VEHICLEEMBARKING: return _SC("Vehicle Embarking");
|
||||
case EVT_VEHICLEEMBARKED: return _SC("Vehicle Embarked");
|
||||
case EVT_VEHICLEDISEMBARK: return _SC("Vehicle Disembark");
|
||||
case EVT_PICKUPCLAIMED: return _SC("Pickup Claimed");
|
||||
case EVT_PICKUPCOLLECTED: return _SC("Pickup Collected");
|
||||
case EVT_OBJECTSHOT: return _SC("Object Shot");
|
||||
case EVT_OBJECTBUMP: return _SC("Object Bump");
|
||||
case EVT_CHECKPOINTENTERED: return _SC("Checkpoint Entered");
|
||||
case EVT_CHECKPOINTEXITED: return _SC("Checkpoint Exited");
|
||||
case EVT_SPHEREENTERED: return _SC("Sphere Entered");
|
||||
case EVT_SPHEREEXITED: return _SC("Sphere Exited");
|
||||
case EVT_SERVERFRAME: return _SC("Server Frame");
|
||||
case EVT_SERVERSTARTUP: return _SC("Server Startup");
|
||||
case EVT_SERVERSHUTDOWN: return _SC("Server Shutdown");
|
||||
case EVT_INTERNALCOMMAND: return _SC("Internal Command");
|
||||
case EVT_LOGINATTEMPT: return _SC("Login Attempt");
|
||||
case EVT_CUSTOMEVENT: return _SC("Custom Event");
|
||||
case EVT_WORLDOPTION: return _SC("World Option");
|
||||
case EVT_WORLDTOGGLE: return _SC("World Toggle");
|
||||
case EVT_SCRIPTRELOAD: return _SC("Script Reload");
|
||||
case EVT_LOGMESSAGE: return _SC("Log Message");
|
||||
default: return _SC("Unknown");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
bool Register_Event(HSQUIRRELVM vm)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
} // Namespace:: SqMod
|
15
source/Event/Shared.hpp
Normal file
15
source/Event/Shared.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef _SQMOD_EVENT_SHARED_HPP_
|
||||
#define _SQMOD_EVENT_SHARED_HPP_
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Signal.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * GetEventName(EventType evt);
|
||||
|
||||
} // Namespace:: SqMod
|
||||
|
||||
#endif // _SQMOD_EVENT_SHARED_HPP_
|
Reference in New Issue
Block a user