Removed deprecated setChat

This commit is contained in:
John 2015-05-30 17:39:26 +03:00 committed by Loudrob
parent f1ffdc9a1e
commit 128430f0c6
4 changed files with 2 additions and 43 deletions

View file

@ -188,23 +188,6 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
if not quiet:
pass
def b_setChat(self, chatString, chatFlags):
if self.cr.wantMagicWords and len(chatString) > 0 and chatString[0] == '~':
messenger.send('magicWord', [chatString])
else:
if base.config.GetBool('want-chatfilter-hacks', 0):
if base.config.GetBool('want-chatfilter-drop-offending', 0):
if badwordpy.test(chatString):
return
else:
chatString = badwordpy.scrub(chatString)
messenger.send('wakeup')
self.setChatAbsolute(chatString, chatFlags)
self.d_setChat(chatString, chatFlags)
def d_setChat(self, chatString, chatFlags):
self.sendUpdate('setChat', [chatString, chatFlags, 0])
def setTalk(self, fromAV, fromAC, avatarName, chat, mods, flags):
if not base.cr.verifyMessage(chat):
return
@ -235,20 +218,6 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
def scrubTalk(self, chat, mods):
return chat
def setChat(self, chatString, chatFlags, DISLid):
self.notify.error('Should call setTalk')
chatString = base.talkAssistant.whiteListFilterMessage(chatString)
if base.localAvatar.isIgnored(self.doId):
return
if base.localAvatar.garbleChat and not self.isUnderstandable():
chatString = self.chatGarbler.garble(self, chatString)
chatFlags &= ~(CFQuicktalker | CFPageButton | CFQuitButton)
if chatFlags & CFThought:
chatFlags &= ~(CFSpeech | CFTimeout)
else:
chatFlags |= CFSpeech | CFTimeout
self.setChatAbsolute(chatString, chatFlags)
def b_setSC(self, msgIndex):
self.setSC(msgIndex)
self.d_setSC(msgIndex)

View file

@ -64,16 +64,6 @@ class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.Pl
def decrementPopulation(self):
simbase.air.decrementPopulation()
def b_setChat(self, chatString, chatFlags):
self.setChat(chatString, chatFlags)
self.d_setChat(chatString, chatFlags)
def d_setChat(self, chatString, chatFlags):
self.sendUpdate('setChat', [chatString, chatFlags])
def setChat(self, chatString, chatFlags):
pass
def d_setMaxHp(self, maxHp):
DistributedAvatarAI.DistributedAvatarAI.d_setMaxHp(self, maxHp)
self.air.writeServerEvent('setMaxHp', self.doId, '%s' % maxHp)

View file

@ -85,7 +85,7 @@ class DistributedLawOfficeFloor(DistributedLevel.DistributedLevel, LawOfficeBase
h = base.localAvatar.getH(self.getZoneNode(self.lastToonZone))
print 'factory pos: %s, h: %s, zone %s' % (repr(pos), h, self.lastToonZone)
posStr = 'X: %.3f' % pos[0] + '\nY: %.3f' % pos[1] + '\nZ: %.3f' % pos[2] + '\nH: %.3f' % h + '\nZone: %s' % str(self.lastToonZone)
base.localAvatar.setChat(posStr, CFThought, 0)
base.localAvatar.setChatAbsolute(posStr, CFThought)
self.accept('f2', printPos)
base.localAvatar.setCameraCollisionsCanMove(1)