Files
PyG2O/source/functions/squirrel/functions.cpp
2025-01-25 00:02:52 +03:00

155 lines
4.9 KiB
C++

#include <sqapi.h>
#include "squirrel/functions.h"
namespace nonut
{
ServerFunctions::ServerFunctions() :
FUNCTION_CTOR(getMaxSlots),
FUNCTION_CTOR(getHostname),
FUNCTION_CTOR(getPlayersCount),
FUNCTION_CTOR(getDistance2d),
FUNCTION_CTOR(getDistance3d),
FUNCTION_CTOR(getVectorAngle),
FUNCTION_CTOR(sendMessageToAll),
FUNCTION_CTOR(sendMessageToPlayer),
FUNCTION_CTOR(sendPlayerMessageToAll),
FUNCTION_CTOR(sendPlayerMessageToPlayer),
FUNCTION_CTOR(exit),
FUNCTION_CTOR(getDayLength),
FUNCTION_CTOR(getServerDescription),
FUNCTION_CTOR(getServerWorld),
FUNCTION_CTOR(getTime),
FUNCTION_CTOR(serverLog),
FUNCTION_CTOR(setDayLength),
FUNCTION_CTOR(setServerDescription),
FUNCTION_CTOR(setServerWorld),
FUNCTION_CTOR(setTime),
FUNCTION_CTOR(clearNpcActions),
FUNCTION_CTOR(createNpc),
FUNCTION_CTOR(destroyNpc),
FUNCTION_CTOR(getNpcAction),
//FUNCTION_CTOR(getNpcActionType),
FUNCTION_CTOR(getNpcActions),
FUNCTION_CTOR(getNpcActionsCount),
FUNCTION_CTOR(getNpcHostPlayer),
FUNCTION_CTOR(getNpcLastActionId),
FUNCTION_CTOR(isNpc),
FUNCTION_CTOR(isNpcActionFinished),
FUNCTION_CTOR(npcAttackMelee),
FUNCTION_CTOR(npcAttackRanged),
FUNCTION_CTOR(npcSpellCast),
FUNCTION_CTOR(npcUseClosestMob),
//FUNCTION_CTOR(pushNpcAction),
FUNCTION_CTOR(setNpcHostPlayer),
FUNCTION_CTOR(addBan),
FUNCTION_CTOR(applyPlayerOverlay),
FUNCTION_CTOR(ban),
FUNCTION_CTOR(drawWeapon),
FUNCTION_CTOR(equipItem),
FUNCTION_CTOR(getPlayerAmulet),
FUNCTION_CTOR(getPlayerAngle),
FUNCTION_CTOR(getPlayerAni),
FUNCTION_CTOR(getPlayerArmor),
FUNCTION_CTOR(getPlayerAtVector),
FUNCTION_CTOR(getPlayerBelt),
FUNCTION_CTOR(getPlayerCameraPosition),
FUNCTION_CTOR(getPlayerCollision),
FUNCTION_CTOR(getPlayerColor),
FUNCTION_CTOR(getPlayerContext),
FUNCTION_CTOR(getPlayerDexterity),
FUNCTION_CTOR(getPlayerFaceAnis),
FUNCTION_CTOR(getPlayerFatness),
FUNCTION_CTOR(getPlayerFocus),
FUNCTION_CTOR(getPlayerHealth),
FUNCTION_CTOR(getPlayerHelmet),
FUNCTION_CTOR(getPlayerIP),
FUNCTION_CTOR(getPlayerInstance),
FUNCTION_CTOR(getPlayerMacAddr),
FUNCTION_CTOR(getPlayerMana),
FUNCTION_CTOR(getPlayerMaxHealth),
FUNCTION_CTOR(getPlayerMaxMana),
FUNCTION_CTOR(getPlayerMeleeWeapon),
FUNCTION_CTOR(getPlayerName),
FUNCTION_CTOR(getPlayerPing),
FUNCTION_CTOR(getPlayerPosition),
FUNCTION_CTOR(getPlayerRangedWeapon),
FUNCTION_CTOR(getPlayerRespawnTime),
FUNCTION_CTOR(getPlayerRing),
FUNCTION_CTOR(getPlayerScale),
FUNCTION_CTOR(getPlayerSerial),
FUNCTION_CTOR(getPlayerShield),
FUNCTION_CTOR(getPlayerSkillWeapon),
FUNCTION_CTOR(getPlayerSpell),
FUNCTION_CTOR(getPlayerStrength),
FUNCTION_CTOR(getPlayerTalent),
FUNCTION_CTOR(getPlayerUID),
FUNCTION_CTOR(getPlayerVirtualWorld),
FUNCTION_CTOR(getPlayerVisual),
FUNCTION_CTOR(getPlayerWeaponMode),
FUNCTION_CTOR(getPlayerWorld),
FUNCTION_CTOR(giveItem),
FUNCTION_CTOR(hitPlayer),
FUNCTION_CTOR(isPlayerConnected),
FUNCTION_CTOR(isPlayerDead),
FUNCTION_CTOR(isPlayerUnconscious),
FUNCTION_CTOR(kick),
FUNCTION_CTOR(playAni),
FUNCTION_CTOR(playFaceAni),
FUNCTION_CTOR(readySpell),
FUNCTION_CTOR(removeItem),
FUNCTION_CTOR(removePlayerOverlay),
FUNCTION_CTOR(removeWeapon),
FUNCTION_CTOR(respawnPlayer),
FUNCTION_CTOR(setPlayerAngle),
FUNCTION_CTOR(setPlayerCollision),
FUNCTION_CTOR(setPlayerColor),
FUNCTION_CTOR(setPlayerContext),
FUNCTION_CTOR(setPlayerDexterity),
FUNCTION_CTOR(setPlayerFatness),
FUNCTION_CTOR(setPlayerHealth),
FUNCTION_CTOR(setPlayerInstance),
FUNCTION_CTOR(setPlayerInvisible),
FUNCTION_CTOR(setPlayerMana),
FUNCTION_CTOR(setPlayerMaxHealth),
FUNCTION_CTOR(setPlayerMaxMana),
FUNCTION_CTOR(setPlayerName),
FUNCTION_CTOR(setPlayerPosition),
FUNCTION_CTOR(setPlayerRespawnTime),
FUNCTION_CTOR(setPlayerScale),
FUNCTION_CTOR(setPlayerSkillWeapon),
FUNCTION_CTOR(setPlayerStrength),
FUNCTION_CTOR(setPlayerTalent),
FUNCTION_CTOR(setPlayerVirtualWorld),
FUNCTION_CTOR(setPlayerVisual),
FUNCTION_CTOR(setPlayerWeaponMode),
FUNCTION_CTOR(setPlayerWorld),
FUNCTION_CTOR(spawnPlayer),
FUNCTION_CTOR(stopAni),
FUNCTION_CTOR(stopFaceAni),
FUNCTION_CTOR(unequipItem),
FUNCTION_CTOR(unreadySpell),
FUNCTION_CTOR(unspawnPlayer),
FUNCTION_CTOR(useItem),
FUNCTION_CTOR(useItemToState),
FUNCTION_CTOR(findNearbyPlayers),
FUNCTION_CTOR(getSpawnedPlayersForPlayer),
FUNCTION_CTOR(getStreamedPlayersByPlayer),
FUNCTION_CTOR(getNearestWaypoint),
FUNCTION_CTOR(getWaypoint)
{}
ServerFunctions* ServerFunctions::getInstance()
{
if (instance == nullptr)
{
instance = new ServerFunctions();
}
return instance;
}
}