diff --git a/Scripts/Python/nxusBookMachine.py b/Scripts/Python/nxusBookMachine.py index 753ac75905..aca3e5250a 100644 --- a/Scripts/Python/nxusBookMachine.py +++ b/Scripts/Python/nxusBookMachine.py @@ -581,14 +581,14 @@ def IMakeHoodPublic(self): hoodInfo = self.IGetHoodInfoNode() if hoodInfo is not None: infoStruct = hoodInfo.asAgeInfoStruct() - PtCreatePublicAge(infoStruct, self) + PtCreatePublicAge(infoStruct) def IMakeHoodPrivate(self): hoodInfo = self.IGetHoodInfoNode() if hoodInfo is not None: guid = hoodInfo.getAgeInstanceGuid() - PtRemovePublicAge(guid, self) + PtRemovePublicAge(guid) def IPublicAgeCreated(self, ageName): PtDebugPrint("IPublicAgeCreated: " + ageName) diff --git a/Scripts/Python/plasma/Plasma.py b/Scripts/Python/plasma/Plasma.py index 317a93b921..513d9ed2af 100644 --- a/Scripts/Python/plasma/Plasma.py +++ b/Scripts/Python/plasma/Plasma.py @@ -164,9 +164,8 @@ def PtCreatePlayer(playerName, avatarShape, invitation): """Creates a new player""" pass -def PtCreatePublicAge(ageInfo, cbObject=None): - """Create a public instance of the given age. -cbObject, if supplied should have a member called publicAgeCreated(self,ageInfo)""" +def PtCreatePublicAge(ageInfo): + """Create a public instance of the given age.""" pass def PtDebugAssert(cond, msg): @@ -686,9 +685,8 @@ def PtRecenterCamera(): """re-centers the camera""" pass -def PtRemovePublicAge(ageInstanceGuid, cbObject=None): - """Remove a public instance of the given age. -cbObject, if supplied should have a member called publicAgeRemoved(self,ageInstanceGuid)""" +def PtRemovePublicAge(ageInstanceGuid): + """Remove a public instance of the given age.""" pass def PtRequestLOSScreen(selfKey,ID,xPos,yPos,distance,what,reportType): diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp index 97958c8820..86f1bde52a 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp @@ -2189,30 +2189,28 @@ void cyMisc::GetPublicAgeList(const ST::string& ageName, PyObject * cbObject) ////////////////////////////////////////////////////////////////////////////// // // Function : CreatePublicAge -// PARAMETERS : ageInfo, callback object +// PARAMETERS : ageInfo // // PURPOSE : Add a public age to the list of available ones. // -void cyMisc::CreatePublicAge( pyAgeInfoStruct * ageInfo, PyObject * cbObject ) +void cyMisc::CreatePublicAge(pyAgeInfoStruct* ageInfo) { VaultSetOwnedAgePublic(ageInfo->GetAgeInfo(), true); - // TODO: make the callback here } ////////////////////////////////////////////////////////////////////////////// // // Function : RemovePublicAge -// PARAMETERS : ageInstanceGuid, callback object +// PARAMETERS : ageInstanceGuid // // PURPOSE : Remove a public age from the list of available ones. // -void cyMisc::RemovePublicAge(const ST::string& ageInstanceGuid, PyObject * cbObject/*=nullptr */) +void cyMisc::RemovePublicAge(const ST::string& ageInstanceGuid) { plAgeInfoStruct info; plUUID uuid(ageInstanceGuid); info.SetAgeInstanceGuid(&uuid); VaultSetOwnedAgePublic(&info, false); - // TODO: make the callback here } int cyMisc::GetKILevel() diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMisc.h b/Sources/Plasma/FeatureLib/pfPython/cyMisc.h index ce43fbbd41..91d21f9e04 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMisc.h +++ b/Sources/Plasma/FeatureLib/pfPython/cyMisc.h @@ -753,20 +753,20 @@ class cyMisc ////////////////////////////////////////////////////////////////////////////// // // Function : CreatePublicAge - // PARAMETERS : ageInfo, callback object + // PARAMETERS : ageInfo // // PURPOSE : Add a public age to the list of available ones. // - static void CreatePublicAge(pyAgeInfoStruct * ageInfo, PyObject * cbObject = nullptr); + static void CreatePublicAge(pyAgeInfoStruct* ageInfo); ////////////////////////////////////////////////////////////////////////////// // // Function : RemovePublicAge - // PARAMETERS : ageInstanceGuid, callback object + // PARAMETERS : ageInstanceGuid // // PURPOSE : Remove a public age from the list of available ones. // - static void RemovePublicAge(const ST::string& ageInstanceGuid, PyObject * cbObject = nullptr); + static void RemovePublicAge(const ST::string& ageInstanceGuid); ////////////////////////////////////////////////////////////////////////////// // diff --git a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp index ab150b4a22..440c7ee68b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp @@ -243,37 +243,33 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtGetPublicAgeList, args, "Params: ageName, cbOb PYTHON_RETURN_NONE; } -PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePublicAge, args, "Params: ageInfo, cbObject=None\nCreate a public instance of the given age.\n" - "cbObject, if supplied should have a member called publicAgeCreated(self,ageInfo)") +PYTHON_GLOBAL_METHOD_DEFINITION(PtCreatePublicAge, args, "Params: ageInfo\nCreate a public instance of the given age.") { PyObject* ageInfoObj = nullptr; - PyObject* cbObject = nullptr; - if (!PyArg_ParseTuple(args, "O|O", &ageInfoObj, &cbObject)) + if (!PyArg_ParseTuple(args, "O", &ageInfoObj)) { - PyErr_SetString(PyExc_TypeError, "PtCreatePublicAge expects a ptAgeInfoStruct object and an optional object with a publicAgeCreated() method"); + PyErr_SetString(PyExc_TypeError, "PtCreatePublicAge expects a ptAgeInfoStruct object"); PYTHON_RETURN_ERROR; } if (!pyAgeInfoStruct::Check(ageInfoObj)) { - PyErr_SetString(PyExc_TypeError, "PtCreatePublicAge expects a ptAgeInfoStruct object and an optional object with a publicAgeCreated() method"); + PyErr_SetString(PyExc_TypeError, "PtCreatePublicAge expects a ptAgeInfoStruct object"); PYTHON_RETURN_ERROR; } pyAgeInfoStruct* ageInfo = pyAgeInfoStruct::ConvertFrom(ageInfoObj); - cyMisc::CreatePublicAge(ageInfo, cbObject); + cyMisc::CreatePublicAge(ageInfo); PYTHON_RETURN_NONE; } -PYTHON_GLOBAL_METHOD_DEFINITION(PtRemovePublicAge, args, "Params: ageInstanceGuid, cbObject=None\nRemove a public instance of the given age.\n" - "cbObject, if supplied should have a member called publicAgeRemoved(self,ageInstanceGuid)") +PYTHON_GLOBAL_METHOD_DEFINITION(PtRemovePublicAge, args, "Params: ageInstanceGuid\nRemove a public instance of the given age.") { ST::string ageInstanceGUID; - PyObject* cbObject = nullptr; - if (!PyArg_ParseTuple(args, "O&|O", PyUnicode_STStringConverter, &ageInstanceGUID, &cbObject)) + if (!PyArg_ParseTuple(args, "O&", PyUnicode_STStringConverter, &ageInstanceGUID)) { - PyErr_SetString(PyExc_TypeError, "PtRemovePublicAge expects a string and an optional object with a publicAgeRemoved() method"); + PyErr_SetString(PyExc_TypeError, "PtRemovePublicAge expects a string"); PYTHON_RETURN_ERROR; } - cyMisc::RemovePublicAge(ageInstanceGUID, cbObject); + cyMisc::RemovePublicAge(ageInstanceGUID); PYTHON_RETURN_NONE; }