mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
DANIEL: Chat color shit
This commit is contained in:
parent
e082fecf0b
commit
67f7c45f68
5 changed files with 35 additions and 43 deletions
|
@ -131,7 +131,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTQuickTalker)
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
return
|
||||
|
||||
def whisperSCCustomTo(self, msgIndex, sendToId):
|
||||
|
@ -152,8 +152,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCCustomMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTQuickTalker)
|
||||
return
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
|
||||
def whisperSCEmoteTo(self, emoteId, sendToId):
|
||||
messenger.send('wakeup')
|
||||
|
|
|
@ -888,7 +888,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
def displayWhisper(self, fromId, chatString, whisperType):
|
||||
sender = None
|
||||
sfx = self.soundWhisper
|
||||
if whisperType == WTNormal or whisperType == WTQuickTalker:
|
||||
if whisperType == WTNormal:
|
||||
if sender == None:
|
||||
return
|
||||
chatString = sender.getName() + ': ' + chatString
|
||||
|
|
|
@ -8,48 +8,41 @@ CFNoQuitButton = 1 << 6
|
|||
CFReversed = 1 << 7
|
||||
|
||||
WTNormal = 0
|
||||
WTQuickTalker = 1
|
||||
WTSystem = 2
|
||||
WTBattleSOS = 3
|
||||
WTEmote = 4
|
||||
WTToontownBoardingGroup = 5
|
||||
WTSystem = 1
|
||||
WTBattleSOS = 2
|
||||
WTEmote = 3
|
||||
WTToontownBoardingGroup = 4
|
||||
|
||||
# Foreground, background:
|
||||
WhisperColors = {
|
||||
WTNormal: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.6, 0.8, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)) # Disabled
|
||||
),
|
||||
WTQuickTalker: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.6, 0.8, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)) # Disabled
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.6, 0.8, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)) # Disabled
|
||||
),
|
||||
WTSystem: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 1.0, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)) # Disabled
|
||||
),
|
||||
WTBattleSOS: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 0.0, 0.8)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)) # Disabled
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 1.0, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)) # Disabled
|
||||
),
|
||||
WTEmote: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.1, 0.7, 0.41, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (0.2, 0.7, 0.41, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.1, 0.6, 0.51, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.1, 0.6, 0.41, 0.6)) # Disabled
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6)), # Disabled
|
||||
),
|
||||
WTBattleSOS: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.6, 0.8, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)) # Disabled
|
||||
),
|
||||
WTToontownBoardingGroup: (
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6)) # Disabled
|
||||
),
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)), # Normal
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)), # Click
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)), # Rollover
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6)) # Disabled
|
||||
)
|
||||
}
|
||||
|
|
|
@ -515,12 +515,12 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
base.cr.ttsFriendsManager.d_sleepAutoReply(fromId)
|
||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTQuickTalker)
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
base.talkAssistant.receiveAvatarWhisperSpeedChat(TalkAssistant.SPEEDCHAT_NORMAL, msgIndex, fromId)
|
||||
return
|
||||
|
||||
def setWhisperSCCustomFrom(self, fromId, msgIndex):
|
||||
handle = base.cr.identifyFriend(fromId)
|
||||
handle = base.cr.identifyAvatar(fromId)
|
||||
if handle == None:
|
||||
return
|
||||
if not localAvatar.acceptingNonFriendWhispers:
|
||||
|
@ -549,7 +549,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
|
||||
chatString = TTSCDecoders.decodeTTSCToontaskMsg(taskId, toNpcId, toonProgress, msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTQuickTalker)
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
|
||||
def getNPCFriendsDict(self):
|
||||
return self.NPCFriendsDict
|
||||
|
|
|
@ -805,7 +805,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
|||
sfx = self.soundPhoneRing
|
||||
elif fromId != 0:
|
||||
sender = base.cr.identifyAvatar(fromId)
|
||||
if whisperType == WTNormal or whisperType == WTQuickTalker:
|
||||
if whisperType == WTNormal:
|
||||
if sender == None:
|
||||
return
|
||||
chatString = sender.getName() + ': ' + chatString
|
||||
|
@ -826,7 +826,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar):
|
|||
sfx = self.soundPhoneRing
|
||||
elif fromId != 0:
|
||||
sender = base.cr.identifyAvatar(fromId)
|
||||
if whisperType == WTNormal or whisperType == WTQuickTalker:
|
||||
if whisperType == WTNormal:
|
||||
if sender == None:
|
||||
return
|
||||
chatString = sender.getName() + ': ' + chatString
|
||||
|
|
Loading…
Reference in a new issue