slight optimization in string handling on taskName and uniqueName
This commit is contained in:
parent
a20301a2b5
commit
b280d1253c
|
|
@ -326,10 +326,10 @@ class DistributedObject(DistributedObjectBase, EnforcesCalldowns):
|
|||
self.cr.sendDeleteMsg(self.doId)
|
||||
|
||||
def taskName(self, taskString):
|
||||
return (taskString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (taskString, self.doId))
|
||||
|
||||
def uniqueName(self, idString):
|
||||
return (idString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (idString, self.doId))
|
||||
|
||||
def getCallbackContext(self, callback, extraArgs = []):
|
||||
# Some objects implement a back-and-forth handshake operation
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|||
pass
|
||||
|
||||
def addInterest(self, zoneId, note="", event=None):
|
||||
self.air.addInterest(self.getDoId(), zoneId, note, event)
|
||||
self.air.addInterest(self.doId, zoneId, note, event)
|
||||
|
||||
def b_setLocation(self, parentId, zoneId):
|
||||
self.d_setLocation(parentId, zoneId)
|
||||
|
|
@ -472,10 +472,10 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns):
|
|||
self._DOAI_requestedDelete = True
|
||||
|
||||
def taskName(self, taskString):
|
||||
return (taskString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (taskString, self.doId))
|
||||
|
||||
def uniqueName(self, idString):
|
||||
return (idString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (idString, self.doId))
|
||||
|
||||
def validate(self, avId, bool, msg):
|
||||
if not bool:
|
||||
|
|
|
|||
|
|
@ -401,10 +401,10 @@ class DistributedObjectUD(DistributedObjectBase):
|
|||
self._DOUD_requestedDelete = True
|
||||
|
||||
def taskName(self, taskString):
|
||||
return (taskString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (taskString, self.doId))
|
||||
|
||||
def uniqueName(self, idString):
|
||||
return (idString + "-" + str(self.getDoId()))
|
||||
return ("%s-%s" % (idString, self.doId))
|
||||
|
||||
def validate(self, avId, bool, msg):
|
||||
if not bool:
|
||||
|
|
|
|||
Loading…
Reference in New Issue