mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -06:00
Current work
This commit is contained in:
parent
cadeff717d
commit
167c5c5736
8 changed files with 34 additions and 51 deletions
|
@ -11,8 +11,8 @@ from otp.chat import ChatGarbler, TalkAssistant
|
|||
from otp.distributed.TelemetryLimited import TelemetryLimited
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.speedchat import SCDecoders
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.chat.WhisperPopup import WhisperPopup
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.margins.WhisperPopup import WhisperPopup
|
||||
|
||||
class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited):
|
||||
chatGarbler = ChatGarbler.ChatGarbler({'default': OTPLocalizer.ChatGarblerDefault})
|
||||
|
@ -114,7 +114,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
if self is localAvatar:
|
||||
return True
|
||||
|
||||
def setSystemMessage(self, aboutId, chatString, whisperType = WTSystem):
|
||||
def setSystemMessage(self, aboutId, chatString, whisperType = WhisperPopup.WTSystem):
|
||||
self.displayWhisper(aboutId, chatString, whisperType)
|
||||
|
||||
def displayWhisper(self, fromId, chatString, whisperType):
|
||||
|
@ -130,7 +130,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCStaticTextMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTNormal)
|
||||
return
|
||||
|
||||
def whisperSCCustomTo(self, msgIndex, sendToId):
|
||||
|
@ -151,7 +151,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCCustomMsg(msgIndex)
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTNormal)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTNormal)
|
||||
|
||||
def whisperSCEmoteTo(self, emoteId, sendToId):
|
||||
messenger.send('wakeup')
|
||||
|
@ -163,7 +163,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
|
|||
return
|
||||
chatString = SCDecoders.decodeSCEmoteWhisperMsg(emoteId, handle.getName())
|
||||
if chatString:
|
||||
self.displayWhisper(fromId, chatString, WTEmote)
|
||||
self.displayWhisper(fromId, chatString, WhisperPopup.WTEmote)
|
||||
return
|
||||
|
||||
def setChatAbsolute(self, chatString, chatFlags, dialogue = None, interrupt = 1, quiet = 0):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.showbase import DirectObject
|
||||
from otp.chat.ChatGlobals import *
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
import ChatUtil
|
||||
|
||||
class TalkAssistant(DirectObject.DirectObject):
|
||||
|
|
|
@ -16,7 +16,7 @@ from otp.distributed.OtpDoGlobals import *
|
|||
from otp.distributed.TelemetryLimiter import TelemetryLimiter
|
||||
from otp.otpbase import OTPGlobals, OTPLocalizer
|
||||
from otp.otpgui import OTPDialog
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
import sys, time, types, random
|
||||
|
||||
class OTPClientRepository(ClientRepositoryBase):
|
||||
|
|
|
@ -5,7 +5,7 @@ from direct.showbase import DirectObject
|
|||
from panda3d.core import *
|
||||
|
||||
from toontown.effects import DistributedFireworkShow
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag import NametagGlobals
|
||||
from toontown.parties import DistributedPartyFireworksActivity
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
@ -63,9 +63,11 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
base.disableMouse()
|
||||
base.render.hide()
|
||||
base.setBackgroundColor(0.05, 0.15, 0.4)
|
||||
base.setCellsActive([base.rightCells[0]], 0)
|
||||
NametagGlobals.setForce2dNametags(True)
|
||||
NametagGlobals.setForceOnscreenChat(True)
|
||||
base.setCellsAvailable([base.rightCells[0]], 0)
|
||||
self.oldMin2dAlpha = NametagGlobals.getMin2dAlpha()
|
||||
self.oldMax2dAlpha = NametagGlobals.getMax2dAlpha()
|
||||
NametagGlobals.setMin2dAlpha(0.8)
|
||||
NametagGlobals.setMax2dAlpha(1.0)
|
||||
self.__isOpen = 1
|
||||
self.__setButtonVisibility()
|
||||
self.show()
|
||||
|
@ -97,9 +99,9 @@ class ShtikerBook(DirectFrame, StateData.StateData):
|
|||
gsg = base.win.getGsg()
|
||||
if gsg:
|
||||
base.render.prepareScene(gsg)
|
||||
base.setCellsActive([base.rightCells[0]], 1)
|
||||
NametagGlobals.setForce2dNametags(False)
|
||||
NametagGlobals.setForceOnscreenChat(False)
|
||||
NametagGlobals.setMin2dAlpha(self.oldMin2dAlpha)
|
||||
NametagGlobals.setMax2dAlpha(self.oldMax2dAlpha)
|
||||
base.setCellsAvailable([base.rightCells[0]], 1)
|
||||
self.__isOpen = 0
|
||||
self.hide()
|
||||
self.hideButton()
|
||||
|
|
|
@ -3,7 +3,7 @@ from direct.actor import Actor
|
|||
from direct.task.Task import Task
|
||||
from otp.avatar import Avatar
|
||||
from toontown.battle import BattleProps, SuitBattleGlobals
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag.NametagGroup import NametagGroup
|
||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||
from toontown.suit import SuitGlobals
|
||||
import SuitDNA, string
|
||||
|
@ -333,7 +333,8 @@ class Suit(Avatar.Avatar):
|
|||
|
||||
Avatar.Avatar.__init__(self)
|
||||
self.setFont(ToontownGlobals.getSuitFont())
|
||||
self.setPlayerType(NametagGlobals.CCSuit)
|
||||
self.setSpeechFont(ToontownGlobals.getSuitFont())
|
||||
self.setPlayerType(NametagGroup.CCSuit)
|
||||
self.setPickable(1)
|
||||
self.leftHand = None
|
||||
self.rightHand = None
|
||||
|
@ -416,8 +417,6 @@ class Suit(Avatar.Avatar):
|
|||
self.generateHead(head)
|
||||
|
||||
self.setHeight(properties[SuitGlobals.HEIGHT_INDEX])
|
||||
if len(properties) > SuitGlobals.NAMETAG_WRAP_INDEX:
|
||||
self.nametag.setWordWrap(properties[SuitGlobals.NAMETAG_WRAP_INDEX])
|
||||
|
||||
self.setName(SuitBattleGlobals.SuitAttributes[dna.name]['name'])
|
||||
self.getGeomNode().setScale(self.scale)
|
||||
|
|
|
@ -29,8 +29,8 @@ from toontown.catalog import CatalogItem
|
|||
from toontown.catalog import CatalogItemList
|
||||
from toontown.chat import ResistanceChat
|
||||
from toontown.chat import ToonChatGarbler
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.chat.WhisperPopup import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.margins.WhisperPopup import *
|
||||
from toontown.coghq import CogDisguiseGlobals
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.distributed import DelayDelete
|
||||
|
@ -46,8 +46,8 @@ from toontown.fishing import FishTank
|
|||
from toontown.friends import FriendHandle
|
||||
from toontown.golf import GolfGlobals
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag import NametagGroup
|
||||
from otp.nametag.NametagGroup import *
|
||||
from toontown.parties import PartyGlobals
|
||||
from toontown.parties.InviteInfo import InviteInfo
|
||||
from toontown.parties.PartyGlobals import InviteStatus, PartyStatus
|
||||
|
@ -2064,36 +2064,15 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
|
|||
DistributedAvatar.DistributedAvatar.setChatAbsolute(self, chatString, chatFlags, dialogue, interrupt)
|
||||
|
||||
def setChatMuted(self, chatString, chatFlags, dialogue=None, interrupt=1, quiet=0):
|
||||
if chatFlags & CFQuicktalker:
|
||||
self.nametag.setChatType(NametagGlobals.SPEEDCHAT)
|
||||
elif chatFlags & CFSpeech:
|
||||
self.nametag.setChatType(NametagGlobals.CHAT)
|
||||
|
||||
if chatFlags & CFThought:
|
||||
self.nametag.setChatBalloonType(NametagGlobals.THOUGHT_BALLOON)
|
||||
else:
|
||||
self.nametag.setChatBalloonType(NametagGlobals.CHAT_BALLOON)
|
||||
|
||||
if chatFlags & CFPageButton:
|
||||
self.nametag.setChatButton(NametagGlobals.pageButton)
|
||||
elif chatFlags & CFQuitButton:
|
||||
self.nametag.setChatButton(NametagGlobals.quitButton)
|
||||
else:
|
||||
self.nametag.setChatButton(NametagGlobals.noButton)
|
||||
|
||||
self.nametag.setChatText(chatString, timeout=bool(chatFlags & CFTimeout))
|
||||
self.nametag.setChat(chatString, chatFlags)
|
||||
self.playCurrentDialogue(dialogue, chatFlags - CFSpeech, interrupt)
|
||||
|
||||
def displayTalk(self, chatString):
|
||||
flags = CFSpeech | CFTimeout
|
||||
self.nametag.setChatType(NametagGlobals.CHAT)
|
||||
if ChatUtil.isThought(chatString):
|
||||
flags = CFThought
|
||||
self.nametag.setChatBalloonType(NametagGlobals.THOUGHT_BALLOON)
|
||||
chatString = ChatUtil.removeThoughtPrefix(chatString)
|
||||
else:
|
||||
self.nametag.setChatBalloonType(NametagGlobals.CHAT_BALLOON)
|
||||
self.nametag.setChatText(chatString, timeout=(flags & CFTimeout))
|
||||
self.nametag.setChat(chatString, flags)
|
||||
if base.toonChatSounds:
|
||||
self.playCurrentDialogue(None, flags, interrupt=1)
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import types
|
|||
import Toon, ToonDNA
|
||||
from otp.avatar import Emote
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from otp.nametag.NametagGroup import *
|
||||
from toontown.toonbase import TTLocalizer
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ from otp.avatar.Avatar import teleportNotify
|
|||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from toontown.battle import SuitBattleGlobals
|
||||
from toontown.chat.ChatGlobals import *
|
||||
from otp.nametag.NametagConstants import *
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.effects import DustCloud
|
||||
from toontown.effects import Wake
|
||||
from toontown.hood import ZoneUtil
|
||||
from toontown.nametag.NametagGlobals import *
|
||||
from otp.nametag.NametagGroup import *
|
||||
from toontown.suit import SuitDNA
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
@ -454,6 +454,7 @@ class Toon(Avatar.Avatar, ToonHead):
|
|||
self.partyHat = None
|
||||
self.setTag('pieCode', str(ToontownGlobals.PieCodeToon))
|
||||
self.setFont(ToontownGlobals.getToonFont())
|
||||
self.setSpeechFont(ToontownGlobals.getToonFont())
|
||||
self.soundChatBubble = base.loadSfx('phase_3/audio/sfx/GUI_balloon_popup.ogg')
|
||||
self.animFSM = ClassicFSM('Toon', [State('off', self.enterOff, self.exitOff),
|
||||
State('neutral', self.enterNeutral, self.exitNeutral),
|
||||
|
@ -2732,6 +2733,7 @@ class Toon(Avatar.Avatar, ToonHead):
|
|||
self.suit.loop('neutral')
|
||||
self.isDisguised = 1
|
||||
self.setFont(ToontownGlobals.getSuitFont())
|
||||
self.setSpeechFont(ToontownGlobals.getSuitFont())
|
||||
if setDisplayName:
|
||||
if hasattr(base, 'idTags') and base.idTags:
|
||||
name = self.getAvIdName()
|
||||
|
@ -2765,7 +2767,8 @@ class Toon(Avatar.Avatar, ToonHead):
|
|||
Emote.globalEmote.releaseAll(self)
|
||||
self.isDisguised = 0
|
||||
self.setFont(ToontownGlobals.getToonFont())
|
||||
self.nametag.setWordWrap(None)
|
||||
self.setSpeechFont(ToontownGlobals.getToonFont())
|
||||
self.nametag.setWordwrap(None)
|
||||
if hasattr(base, 'idTags') and base.idTags:
|
||||
name = self.getAvIdName()
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue