mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Better nametag wrap for cogs
This commit is contained in:
parent
aa17733adf
commit
dd3867b46c
4 changed files with 15 additions and 11 deletions
|
@ -6,7 +6,7 @@ from toontown.nametag import NametagGlobals
|
||||||
|
|
||||||
|
|
||||||
class Nametag:
|
class Nametag:
|
||||||
TEXT_WORD_WRAP = 7
|
TEXT_WORD_WRAP = 8
|
||||||
TEXT_Y_OFFSET = -0.05
|
TEXT_Y_OFFSET = -0.05
|
||||||
|
|
||||||
CHAT_TEXT_WORD_WRAP = 12
|
CHAT_TEXT_WORD_WRAP = 12
|
||||||
|
|
|
@ -35,8 +35,8 @@ class NametagGroup:
|
||||||
self.chatColor = NametagGlobals.ChatColors[NametagGlobals.CCNormal]
|
self.chatColor = NametagGlobals.ChatColors[NametagGlobals.CCNormal]
|
||||||
self.speedChatColor = VBase4(1, 1, 1, 1)
|
self.speedChatColor = VBase4(1, 1, 1, 1)
|
||||||
|
|
||||||
self.wordWrap = 7
|
self.wordWrap = 8
|
||||||
self.chatWordWrap = 10
|
self.chatWordWrap = 12
|
||||||
|
|
||||||
self.text = ''
|
self.text = ''
|
||||||
|
|
||||||
|
|
|
@ -415,21 +415,24 @@ class Suit(Avatar.Avatar):
|
||||||
self.isSkeleton = 0
|
self.isSkeleton = 0
|
||||||
|
|
||||||
if dna.name in SuitGlobals.suitProperties:
|
if dna.name in SuitGlobals.suitProperties:
|
||||||
self.scale = SuitGlobals.suitProperties[dna.name][SuitGlobals.SCALE_INDEX]
|
properties = SuitGlobals.suitProperties[dna.name]
|
||||||
self.handColor = SuitGlobals.suitProperties[dna.name][SuitGlobals.HAND_COLOR_INDEX]
|
self.scale = properties[SuitGlobals.SCALE_INDEX]
|
||||||
|
self.handColor = properties[SuitGlobals.HAND_COLOR_INDEX]
|
||||||
|
|
||||||
if dna.name == 'cc':
|
if dna.name == 'cc':
|
||||||
self.headColor = SuitGlobals.ColdCallerHead
|
self.headColor = SuitGlobals.ColdCallerHead
|
||||||
|
|
||||||
self.generateBody()
|
self.generateBody()
|
||||||
|
|
||||||
if SuitGlobals.suitProperties[dna.name][SuitGlobals.HEAD_TEXTURE_INDEX]:
|
if properties[SuitGlobals.HEAD_TEXTURE_INDEX]:
|
||||||
self.headTexture = SuitGlobals.suitProperties[dna.name][SuitGlobals.HEAD_TEXTURE_INDEX]
|
self.headTexture = properties[SuitGlobals.HEAD_TEXTURE_INDEX]
|
||||||
|
|
||||||
for head in SuitGlobals.suitProperties[dna.name][SuitGlobals.HEADS_INDEX]:
|
for head in properties[SuitGlobals.HEADS_INDEX]:
|
||||||
self.generateHead(head)
|
self.generateHead(head)
|
||||||
|
|
||||||
self.setHeight(SuitGlobals.suitProperties[dna.name][SuitGlobals.HEIGHT_INDEX])
|
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.setName(SuitBattleGlobals.SuitAttributes[dna.name]['name'])
|
||||||
self.getGeomNode().setScale(self.scale)
|
self.getGeomNode().setScale(self.scale)
|
||||||
|
|
|
@ -7,6 +7,7 @@ HAND_COLOR_INDEX = 1 # The hand color
|
||||||
HEADS_INDEX = 2 # A list of heads
|
HEADS_INDEX = 2 # A list of heads
|
||||||
HEAD_TEXTURE_INDEX = 3 # The texture to use for the head
|
HEAD_TEXTURE_INDEX = 3 # The texture to use for the head
|
||||||
HEIGHT_INDEX = 4 # The height of the cog
|
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'
|
aSize = 6.06 # Size of body type 'a'
|
||||||
bSize = 5.29 # Size of body type 'b'
|
bSize = 5.29 # Size of body type 'b'
|
||||||
|
@ -22,7 +23,7 @@ suitProperties = {'f': (4.0 / cSize, SuitDNA.corpPolyColor, ['flunky', 'glasses'
|
||||||
'ds': (4.5 / bSize, SuitDNA.corpPolyColor, ['beancounter'], '', 6.08),
|
'ds': (4.5 / bSize, SuitDNA.corpPolyColor, ['beancounter'], '', 6.08),
|
||||||
'hh': (6.5 / aSize, SuitDNA.corpPolyColor, ['headhunter'], '', 7.45),
|
'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),
|
'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),
|
'tbc': (7.0 / aSize, VBase4(0.75, 0.95, 0.75, 1.0), ['bigcheese'], '', 9.34, 7),
|
||||||
# Lawbots
|
# Lawbots
|
||||||
'bf': (4.0 / cSize, SuitDNA.legalPolyColor, ['tightwad'], 'bottom-feeder.jpg', 4.81),
|
'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),
|
'b': (4.375 / bSize, VBase4(0.95, 0.95, 1.0, 1.0), ['movershaker'], 'blood-sucker.jpg', 6.17),
|
||||||
|
@ -46,7 +47,7 @@ suitProperties = {'f': (4.0 / cSize, SuitDNA.corpPolyColor, ['flunky', 'glasses'
|
||||||
'tm': (3.75 / bSize, SuitDNA.salesPolyColor, ['telemarketer'], '', 5.24),
|
'tm': (3.75 / bSize, SuitDNA.salesPolyColor, ['telemarketer'], '', 5.24),
|
||||||
'nd': (4.35 / aSize, SuitDNA.salesPolyColor, ['numbercruncher'], 'name-dropper.jpg', 5.98),
|
'nd': (4.35 / aSize, SuitDNA.salesPolyColor, ['numbercruncher'], 'name-dropper.jpg', 5.98),
|
||||||
'gh': (4.75 / cSize, SuitDNA.salesPolyColor, ['gladhander'], '', 6.4),
|
'gh': (4.75 / cSize, SuitDNA.salesPolyColor, ['gladhander'], '', 6.4),
|
||||||
'ms': (4.75 / bSize, SuitDNA.salesPolyColor, ['movershaker'], '', 6.7),
|
'ms': (4.75 / bSize, SuitDNA.salesPolyColor, ['movershaker'], '', 6.7, 7),
|
||||||
'tf': (5.25 / aSize, SuitDNA.salesPolyColor, ['twoface'], '', 6.95),
|
'tf': (5.25 / aSize, SuitDNA.salesPolyColor, ['twoface'], '', 6.95),
|
||||||
'm': (5.75 / aSize, SuitDNA.salesPolyColor, ['twoface'], 'mingler.jpg', 7.61),
|
'm': (5.75 / aSize, SuitDNA.salesPolyColor, ['twoface'], 'mingler.jpg', 7.61),
|
||||||
'mh': (7.0 / aSize, SuitDNA.salesPolyColor, ['yesman'], '', 8.95),
|
'mh': (7.0 / aSize, SuitDNA.salesPolyColor, ['yesman'], '', 8.95),
|
||||||
|
|
Loading…
Reference in a new issue