mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -06:00
Fixed a bunch of issues at once
This commit is contained in:
parent
3b9a4e8820
commit
b38f8472a5
5 changed files with 25 additions and 38 deletions
|
@ -130,44 +130,29 @@ class Avatar(Actor, ShadowCaster):
|
|||
self.setNametagName()
|
||||
|
||||
def considerUnderstandable(self):
|
||||
speed = 0
|
||||
if self.playerType in (NametagGroup.CCNormal, NametagGroup.CCFreeChat, NametagGroup.CCSpeedChat):
|
||||
if self.playerType in (NametagGroup.CCNormal, NametagGroup.CCSpeedChat):
|
||||
self.setPlayerType(NametagGroup.CCSpeedChat)
|
||||
speed = 1
|
||||
if hasattr(base, 'localAvatar') and self == base.localAvatar:
|
||||
if hasattr(base, 'localAvatar') and (self == base.localAvatar):
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCFreeChat)
|
||||
self.setPlayerType(NametagGroup.CCNormal)
|
||||
elif hasattr(self, 'adminAccess') and self.isAdmin():
|
||||
self.understandable = 2
|
||||
self.setPlayerType(NametagGroup.CCAdmin)
|
||||
elif self.playerType == NametagGroup.CCSuit:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCSuit)
|
||||
elif self.playerType not in (NametagGroup.CCNormal, NametagGroup.CCFreeChat, NametagGroup.CCSpeedChat):
|
||||
elif self.playerType not in (NametagGroup.CCNormal, NametagGroup.CCSpeedChat):
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCNoChat)
|
||||
elif hasattr(base, 'localAvatar') and self.commonChatFlags & base.localAvatar.commonChatFlags & OTPGlobals.CommonChat:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCFreeChat)
|
||||
elif self.commonChatFlags & OTPGlobals.SuperChat:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCFreeChat)
|
||||
elif hasattr(base, 'localAvatar') and base.localAvatar.commonChatFlags & OTPGlobals.SuperChat:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCFreeChat)
|
||||
elif base.cr.getFriendFlags(self.doId) & OTPGlobals.FriendChat:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCFreeChat)
|
||||
elif base.cr.playerFriendsManager.findPlayerIdFromAvId(self.doId) is not None:
|
||||
playerInfo = base.cr.playerFriendsManager.findPlayerInfoFromAvId(self.doId)
|
||||
if playerInfo.openChatFriendshipYesNo:
|
||||
self.understandable = 1
|
||||
self.nametag.setColorCode(NametagGroup.CCFreeChat)
|
||||
elif playerInfo.isUnderstandable():
|
||||
self.understandable = 1
|
||||
else:
|
||||
self.understandable = 0
|
||||
elif hasattr(base, 'localAvatar') and self.whitelistChatFlags & base.localAvatar.whitelistChatFlags:
|
||||
self.setPlayerType(NametagGroup.CCNonPlayer)
|
||||
elif settings['trueFriends'] and base.localAvatar.isTrueFriends(self.doId):
|
||||
self.understandable = 2
|
||||
self.setPlayerType(NametagGroup.CCNormal)
|
||||
elif settings['speedchatPlus']:
|
||||
self.understandable = 1
|
||||
self.setPlayerType(NametagGroup.CCSpeedChat)
|
||||
else:
|
||||
self.understandable = 0
|
||||
self.setPlayerType(NametagGroup.CCSpeedChat)
|
||||
if not hasattr(self, 'nametag'):
|
||||
self.notify.warning('no nametag attributed, but would have been used')
|
||||
else:
|
||||
|
@ -248,7 +233,7 @@ class Avatar(Actor, ShadowCaster):
|
|||
if access in OTPLocalizer.AccessToString:
|
||||
name += '\n\x01shadow\x01%s\x02' % OTPLocalizer.AccessToString[access]
|
||||
|
||||
self.nametag.setDisplayName(name)
|
||||
self.nametag.setName(name)
|
||||
|
||||
def getFont(self):
|
||||
return self.__font
|
||||
|
|
|
@ -109,10 +109,11 @@ class Nametag(ClickablePopup):
|
|||
self.DEFAULT_CHAT_WORDWRAP,
|
||||
button=self.getButton(),
|
||||
reversed=reversed)
|
||||
balloon.setScale(0)
|
||||
balloon.reparentTo(self.innerNP)
|
||||
scaleLerp = Sequence(Wait(0.10), LerpScaleInterval(balloon, 0.2, VBase3(1, 1, 1), VBase3(0, 0, 0), blendType='easeInOut'))
|
||||
scaleLerp.start()
|
||||
if self.IS_3D:
|
||||
balloon.setScale(0)
|
||||
scaleLerp = Sequence(Wait(0.10), LerpScaleInterval(balloon, 0.2, VBase3(1, 1, 1), VBase3(0, 0, 0), blendType='easeInOut'))
|
||||
scaleLerp.start()
|
||||
self.frame = frame
|
||||
|
||||
def showThought(self):
|
||||
|
@ -157,4 +158,4 @@ class Nametag(ClickablePopup):
|
|||
self.frame = (t.node().getLeft()-self.NAME_PADDING/2.0,
|
||||
t.node().getRight()+self.NAME_PADDING/2.0,
|
||||
t.node().getBottom()-self.NAME_PADDING/2.0,
|
||||
t.node().getTop()+self.NAME_PADDING/2.0)
|
||||
t.node().getTop()+self.NAME_PADDING/2.0)
|
|
@ -175,7 +175,8 @@ DEFAULT_WORDWRAPS = {
|
|||
CCSuitBuilding: 8.5,
|
||||
CCHouseBuilding: 10.0,
|
||||
CCSpeedChat: 7.5,
|
||||
CCFreeChat: 7.5
|
||||
CCFreeChat: 7.5,
|
||||
CCAdmin: 7.5
|
||||
}
|
||||
|
||||
WTNormal = 0
|
||||
|
|
|
@ -13,6 +13,7 @@ class NametagGroup:
|
|||
CCHouseBuilding = CCHouseBuilding
|
||||
CCSpeedChat = CCSpeedChat
|
||||
CCFreeChat = CCFreeChat
|
||||
CCAdmin = CCAdmin
|
||||
|
||||
CHAT_TIMEOUT_MAX = 12.0
|
||||
CHAT_TIMEOUT_MIN = 4.0
|
||||
|
|
|
@ -7,7 +7,6 @@ HAND_COLOR_INDEX = 1 # The hand color
|
|||
HEADS_INDEX = 2 # A list of heads
|
||||
HEAD_TEXTURE_INDEX = 3 # The texture to use for the head
|
||||
HEIGHT_INDEX = 4 # The height of the cog
|
||||
NAMETAG_WRAP_INDEX = 5 # The nametag wrap for the cog
|
||||
|
||||
aSize = 6.06 # Size of body type 'a'
|
||||
bSize = 5.29 # Size of body type 'b'
|
||||
|
@ -23,7 +22,7 @@ suitProperties = {'f': (4.0 / cSize, SuitDNA.corpPolyColor, ['flunky', 'glasses'
|
|||
'ds': (4.5 / bSize, SuitDNA.corpPolyColor, ['beancounter'], '', 6.08),
|
||||
'hh': (6.5 / aSize, SuitDNA.corpPolyColor, ['headhunter'], '', 7.45),
|
||||
'cr': (6.75 / cSize, VBase4(0.85, 0.55, 0.55, 1.0), ['flunky'], 'corporate-raider.jpg', 8.23),
|
||||
'tbc': (7.0 / aSize, VBase4(0.75, 0.95, 0.75, 1.0), ['bigcheese'], '', 9.34, 7),
|
||||
'tbc': (7.0 / aSize, VBase4(0.75, 0.95, 0.75, 1.0), ['bigcheese'], '', 9.34),
|
||||
# Lawbots
|
||||
'bf': (4.0 / cSize, SuitDNA.legalPolyColor, ['tightwad'], 'bottom-feeder.jpg', 4.81),
|
||||
'b': (4.375 / bSize, VBase4(0.95, 0.95, 1.0, 1.0), ['movershaker'], 'blood-sucker.jpg', 6.17),
|
||||
|
@ -47,7 +46,7 @@ suitProperties = {'f': (4.0 / cSize, SuitDNA.corpPolyColor, ['flunky', 'glasses'
|
|||
'tm': (3.75 / bSize, SuitDNA.salesPolyColor, ['telemarketer'], '', 5.24),
|
||||
'nd': (4.35 / aSize, SuitDNA.salesPolyColor, ['numbercruncher'], 'name-dropper.jpg', 5.98),
|
||||
'gh': (4.75 / cSize, SuitDNA.salesPolyColor, ['gladhander'], '', 6.4),
|
||||
'ms': (4.75 / bSize, SuitDNA.salesPolyColor, ['movershaker'], '', 6.7, 7),
|
||||
'ms': (4.75 / bSize, SuitDNA.salesPolyColor, ['movershaker'], '', 6.7),
|
||||
'tf': (5.25 / aSize, SuitDNA.salesPolyColor, ['twoface'], '', 6.95),
|
||||
'm': (5.75 / aSize, SuitDNA.salesPolyColor, ['twoface'], 'mingler.jpg', 7.61),
|
||||
'mh': (7.0 / aSize, SuitDNA.salesPolyColor, ['yesman'], '', 8.95),
|
||||
|
|
Loading…
Reference in a new issue