|
|
@ -188,6 +188,23 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetClientIDFromAvatarKey, args, "Params: avata |
|
|
|
return PyInt_FromLong(cyMisc::GetClientIDFromAvatarKey(*key)); |
|
|
|
return PyInt_FromLong(cyMisc::GetClientIDFromAvatarKey(*key)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD_DEFINITION(PtGetNPCByID, args, "This will return the NPC with a specific ID") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int npcID; |
|
|
|
|
|
|
|
if (!PyArg_ParseTuple(args, "i", &npcID)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
PyErr_SetString(PyExc_TypeError, "PtGetNPCByID expects an integer"); |
|
|
|
|
|
|
|
PYTHON_RETURN_ERROR; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return cyMisc::GetNPC(npcID); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetNPCCount, "Returns the number of NPCs in the current age") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return cyMisc::GetNPCCount(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetNumRemotePlayers, "Returns the number of remote players in this Age with you.") |
|
|
|
PYTHON_GLOBAL_METHOD_DEFINITION_NOARGS(PtGetNumRemotePlayers, "Returns the number of remote players in this Age with you.") |
|
|
|
{ |
|
|
|
{ |
|
|
|
return PyInt_FromLong(cyMisc::GetNumRemotePlayers()); |
|
|
|
return PyInt_FromLong(cyMisc::GetNumRemotePlayers()); |
|
|
@ -507,6 +524,8 @@ void cyMisc::AddPlasmaMethods(std::vector<PyMethodDef> &methods) |
|
|
|
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtMaxListenDistSq); |
|
|
|
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtMaxListenDistSq); |
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtGetAvatarKeyFromClientID); |
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtGetAvatarKeyFromClientID); |
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtGetClientIDFromAvatarKey); |
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtGetClientIDFromAvatarKey); |
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtGetNPCByID); |
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetNPCCount); |
|
|
|
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetNumRemotePlayers); |
|
|
|
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetNumRemotePlayers); |
|
|
|
|
|
|
|
|
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtValidateKey); |
|
|
|
PYTHON_GLOBAL_METHOD(methods, PtValidateKey); |
|
|
|