From fbca6204773a64a25d2bfd0607bf9b964af6e451 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 13 Oct 2013 23:24:34 -0600 Subject: [PATCH] Add requestDelete to AIR. --- direct/src/distributed/AstronInternalRepository.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/direct/src/distributed/AstronInternalRepository.py b/direct/src/distributed/AstronInternalRepository.py index 581cc2c61d..7f672da6e7 100644 --- a/direct/src/distributed/AstronInternalRepository.py +++ b/direct/src/distributed/AstronInternalRepository.py @@ -209,6 +209,18 @@ class AstronInternalRepository(ConnectionRepository): self.addDOToTables(do, location=(parentId, zoneId)) do.sendGenerateWithRequired(self, parentId or 1, zoneId, optionalFields) + def requestDelete(self, do): + """ + Request the deletion of an object that already exists on the State Server. + + You should probably use do.requestDelete() instead. + """ + + dg = PyDatagram() + dg.addServerHeader(do.doId, self.ourChannel, STATESERVER_OBJECT_DELETE_RAM) + dg.addUint32(do.doId) + self.send(dg) + def connect(self, host, port=7199): """ Connect to a Message Director. The airConnected message is sent upon