mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
nametags: Removed a few unused nametags, added boardinggroup and battlesos color, fixed toon statue selection GUI, doodles now have green nametags.
This commit is contained in:
parent
071d59f4d0
commit
2c451321b2
5 changed files with 36 additions and 57 deletions
|
@ -102,7 +102,7 @@ class Avatar(Actor, ShadowCaster):
|
|||
if self.isUnderstandable():
|
||||
self.nametag.setColorCode(self.playerType)
|
||||
else:
|
||||
self.nametag.setColorCode(NametagGroup.CCNoChat)
|
||||
self.nametag.setColorCode(NametagGroup.CCNonPlayer)
|
||||
self.setNametagName()
|
||||
|
||||
def considerUnderstandable(self):
|
||||
|
|
|
@ -9,15 +9,13 @@ CFThought=2
|
|||
CFTimeout=8
|
||||
|
||||
CCNormal = 0
|
||||
CCNoChat = 1
|
||||
CCNonPlayer = 2
|
||||
CCSuit = 3
|
||||
CCToonBuilding = 4
|
||||
CCSuitBuilding = 5
|
||||
CCHouseBuilding = 6
|
||||
CCSpeedChat = 7
|
||||
CCFreeChat = 8
|
||||
CCAdmin = 9
|
||||
CCNonPlayer = 1
|
||||
CCSuit = 2
|
||||
CCToonBuilding = 3
|
||||
CCSuitBuilding = 4
|
||||
CCHouseBuilding = 5
|
||||
CCSpeedChat = 6
|
||||
CCAdmin = 7
|
||||
|
||||
NAMETAG_COLORS = {
|
||||
CCNormal: (
|
||||
|
@ -34,20 +32,6 @@ NAMETAG_COLORS = {
|
|||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
),
|
||||
CCNoChat: (
|
||||
# Normal FG BG
|
||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Click FG BG
|
||||
((1.0, 0.5, 0.5, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
|
||||
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Hover FG BG
|
||||
((1.0, 0.5, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
|
||||
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Disable FG BG
|
||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
),
|
||||
CCNonPlayer: (
|
||||
# Normal FG BG
|
||||
((0.8, 0.4, 0.0, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
|
@ -132,20 +116,6 @@ NAMETAG_COLORS = {
|
|||
((0.0, 0.6, 0.2, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
),
|
||||
CCFreeChat: (
|
||||
# Normal FG BG
|
||||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Click FG BG
|
||||
((0.2, 0.2, 0.5, 1.0), (0.2, 0.2, 0.2, 0.6), # Name
|
||||
(1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Hover FG BG
|
||||
((0.5, 0.5, 1.0, 1.0), (1.0, 1.0, 1.0, 1.0), # Name
|
||||
(0.0, 0.6, 0.6, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
# Disable FG BG
|
||||
((0.3, 0.3, 0.7, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
(0.0, 0.0, 0.0, 1.0), (1.0, 1.0, 1.0, 1.0)), # Chat
|
||||
),
|
||||
CCAdmin: (
|
||||
# Normal FG BG
|
||||
((1.0, 0.35, 0.25, 1.0), (0.8, 0.8, 0.8, 0.5), # Name
|
||||
|
@ -168,14 +138,12 @@ ARROW_COLORS = {
|
|||
|
||||
DEFAULT_WORDWRAPS = {
|
||||
CCNormal: 7.5,
|
||||
CCNoChat: 7.5,
|
||||
CCNonPlayer: 7.5,
|
||||
CCSuit: 7.5,
|
||||
CCToonBuilding: 8.5,
|
||||
CCSuitBuilding: 8.5,
|
||||
CCHouseBuilding: 10.0,
|
||||
CCSpeedChat: 7.5,
|
||||
CCFreeChat: 7.5,
|
||||
CCAdmin: 7.5
|
||||
}
|
||||
|
||||
|
@ -195,7 +163,7 @@ WHISPER_COLORS = {
|
|||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)),
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6))
|
||||
),
|
||||
WTQuickTalker: (
|
||||
# Normal FG BG
|
||||
|
@ -205,7 +173,7 @@ WHISPER_COLORS = {
|
|||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.9, 0.6)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6)),
|
||||
((0.0, 0.0, 0.0, 1.0), (0.2, 0.7, 0.8, 0.6))
|
||||
),
|
||||
WTSystem: (
|
||||
# Normal FG BG
|
||||
|
@ -215,9 +183,18 @@ WHISPER_COLORS = {
|
|||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 1.0, 0.6)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)),
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6))
|
||||
),
|
||||
WTBattleSOS: (
|
||||
# Normal FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6)),
|
||||
# Click FG BG
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)),
|
||||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.4, 0.0, 0.8)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.8, 0.3, 0.6, 0.6))
|
||||
),
|
||||
# TODO: WTBattleSOS
|
||||
WTEmote: (
|
||||
# Normal FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)),
|
||||
|
@ -226,9 +203,18 @@ WHISPER_COLORS = {
|
|||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6)),
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6))
|
||||
),
|
||||
# TODO: WTToontownBoardingGroup
|
||||
WTToontownBoardingGroup: (
|
||||
# Normal FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.5, 0.1, 0.6)),
|
||||
# Click FG BG
|
||||
((1.0, 0.5, 0.5, 1.0), (1.0, 1.0, 1.0, 0.8)),
|
||||
# Hover FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.2, 0.6)),
|
||||
# Disable FG BG
|
||||
((0.0, 0.0, 0.0, 1.0), (0.9, 0.6, 0.1, 0.6))
|
||||
)
|
||||
}
|
||||
|
||||
def getFriendColor(handle):
|
||||
|
|
|
@ -5,14 +5,12 @@ from Nametag2d import *
|
|||
|
||||
class NametagGroup:
|
||||
CCNormal = CCNormal
|
||||
CCNoChat = CCNoChat
|
||||
CCNonPlayer = CCNonPlayer
|
||||
CCSuit = CCSuit
|
||||
CCToonBuilding = CCToonBuilding
|
||||
CCSuitBuilding = CCSuitBuilding
|
||||
CCHouseBuilding = CCHouseBuilding
|
||||
CCSpeedChat = CCSpeedChat
|
||||
CCFreeChat = CCFreeChat
|
||||
CCAdmin = CCAdmin
|
||||
|
||||
CHAT_TIMEOUT_MAX = 12.0
|
||||
|
|
|
@ -9,7 +9,7 @@ from panda3d.core import *
|
|||
from toontown.estate import DistributedToonStatuary
|
||||
from toontown.estate import GardenGlobals
|
||||
from toontown.estate import PlantingGUI
|
||||
from otp.nametag import NametagGlobals
|
||||
from otp.nametag import NametagGlobals, NametagConstants
|
||||
from otp.nametag.NametagGroup import *
|
||||
from toontown.toon import DistributedToon
|
||||
from toontown.toon import Toon
|
||||
|
@ -110,11 +110,7 @@ class ToonStatueSelectionGUI(DirectFrame):
|
|||
handle = base.cr.identifyFriend(friendId)
|
||||
if handle and not self.checkFamily(friendId):
|
||||
if hasattr(handle, 'getName'):
|
||||
colorCode = CCSpeedChat
|
||||
if flags & ToontownGlobals.FriendChat:
|
||||
colorCode = CCFreeChat
|
||||
newFF = (friendId, handle.getName(), colorCode)
|
||||
self.ffList.append(newFF)
|
||||
self.ffList.append((friendId, handle.getName(), NametagConstants.getFriendColor(handle)))
|
||||
else:
|
||||
self.notify.warning('Bad Handle for getName in makeFFlist')
|
||||
|
||||
|
@ -128,8 +124,7 @@ class ToonStatueSelectionGUI(DirectFrame):
|
|||
self.scrollList.refresh()
|
||||
|
||||
def makeFamilyButton(self, familyId, familyName, colorCode):
|
||||
fg = NametagGlobals.getNameFg(colorCode, PGButton.SInactive)
|
||||
return DirectButton(relief=None, text=familyName, text_scale=0.04, text_align=TextNode.ALeft, text_fg=fg, text1_bg=self.textDownColor, text2_bg=self.textRolloverColor, text3_fg=self.textDisabledColor, textMayChange=0, command=self.__chooseFriend, extraArgs=[familyId, familyName])
|
||||
return DirectButton(relief=None, text=familyName, text_scale=0.04, text_align=TextNode.ALeft, text_fg=NametagConstants.NAMETAG_COLORS[colorCode][0][0], text1_bg=self.textDownColor, text2_bg=self.textRolloverColor, text3_fg=self.textDisabledColor, textMayChange=0, command=self.__chooseFriend, extraArgs=[familyId, familyName])
|
||||
|
||||
def __chooseFriend(self, friendId, friendName):
|
||||
messenger.send('wakeup')
|
||||
|
|
|
@ -46,7 +46,7 @@ class Pet(Avatar.Avatar):
|
|||
Pet.SerialNum += 1
|
||||
self.lockedDown = 0
|
||||
self.setPickable(1)
|
||||
self.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
self.setPlayerType(NametagGroup.CCSpeedChat)
|
||||
self.animFSM = ClassicFSM('petAnimFSM', [State('off', self.enterOff, self.exitOff),
|
||||
State('neutral', self.enterNeutral, self.exitNeutral),
|
||||
State('neutralHappy', self.enterNeutralHappy, self.exitNeutralHappy),
|
||||
|
|
Loading…
Reference in a new issue