MovieCamera unused cleanup + red admin nametags instead of purple

This commit is contained in:
John 2015-06-10 17:57:47 +03:00 committed by Loudrob
parent 8c0eed8214
commit 887fa8abda
2 changed files with 34 additions and 94 deletions

View file

@ -488,52 +488,6 @@ def chooseSuitShot(attack, attackDuration):
pbpTrack = pbpText.getShowInterval(displayName, 3.5)
return Parallel(camTrack, pbpTrack)
def chooseSuitCloseShot(attack, openDuration, openName, attackDuration):
av = None
duration = attackDuration - openDuration
if duration < 0:
duration = 1e-06
groupStatus = attack['group']
diedTrack = None
if groupStatus == ATK_TGT_SINGLE:
av = attack['target']['toon']
shotChoices = [avatarCloseUpThreeQuarterRightShot, suitGroupThreeQuarterLeftBehindShot]
died = attack['target']['died']
if died != 0:
pbpText = attack['playByPlayText']
diedText = av.getName() + ' was defeated!'
diedTextList = [diedText]
diedTrack = pbpText.getToonsDiedInterval(diedTextList, duration)
elif groupStatus == ATK_TGT_GROUP:
av = None
shotChoices = [allGroupLowShot, suitGroupThreeQuarterLeftBehindShot]
deadToons = []
targetDicts = attack['target']
for targetDict in targetDicts:
died = targetDict['died']
if died != 0:
deadToons.append(targetDict['toon'])
if len(deadToons) > 0:
pbpText = attack['playByPlayText']
diedTextList = []
for toon in deadToons:
pbpText = attack['playByPlayText']
diedTextList.append(toon.getName() + ' was defeated!')
diedTrack = pbpText.getToonsDiedInterval(diedTextList, duration)
else:
notify.error('Bad groupStatus: %s' % groupStatus)
track = apply(random.choice(shotChoices), [av, duration])
if diedTrack == None:
return track
else:
mtrack = Parallel(track, diedTrack)
return mtrack
return
def makeShot(x, y, z, h, p, r, duration, other = None, name = 'makeShot'):
if other:
return heldRelativeShot(other, x, y, z, h, p, r, duration, name)
@ -888,20 +842,6 @@ def randomOverShoulderShot(suit, toon, battle, duration, focus):
return focusShot(x, y, z, duration, toonCentralPoint, splitFocusPoint=suitCentralPoint)
def randomCameraSelection(suit, attack, attackDuration, openShotDuration):
shotChoices = [avatarCloseUpThrowShot,
avatarCloseUpThreeQuarterLeftShot,
allGroupLowShot,
suitGroupLowLeftShot,
avatarBehindHighShot]
if openShotDuration > attackDuration:
openShotDuration = attackDuration
closeShotDuration = attackDuration - openShotDuration
openShot = apply(random.choice(shotChoices), [suit, openShotDuration])
closeShot = chooseSuitCloseShot(attack, closeShotDuration, openShot.getName(), attackDuration)
return Sequence(openShot, closeShot)
def randomToonGroupShot(toons, suit, duration, battle):
sum = 0
for t in toons:

View file

@ -144,53 +144,53 @@ def getFriendColor(handle):
# Foreground, background:
NametagColors = {
CCNormal: ( # Blue
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(1.0, 1.0, 1.0, 0.375)) # Disabled
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.3, 0.3, 0.7, 1.0), VBase4(1.0, 1.0, 1.0, 0.375)) # Disabled
),
CCNonPlayer: ( # Orange
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.8, 0.4, 0.0, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
),
CCSuit: (
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.4, 0.4, 0.4, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Disabled
VBase4(0.8, 0.4, 0.0, 1.0) # Arrow color
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.4, 0.4, 0.4, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Disabled
VBase4(0.8, 0.4, 0.0, 1.0) # Custom arrow color
),
CCSuitBuilding: (
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
),
CCToonBuilding: (
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.1875)), # Down
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.5625)), # Rollover
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
),
CCHouseBuilding: (
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.2, 0.5, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
(VBase4(0.2, 0.6, 0.9, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.2, 0.5, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.5, 0.5, 1.0, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
),
CCSpeedChat: ( # Green
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.0, 0.5, 0.0, 1.0), VBase4(0.5, 0.5, 0.5, 0.1875)), # Down
(VBase4(0.0, 0.7, 0.2, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.0, 0.5, 0.0, 1.0), VBase4(0.5, 0.5, 0.5, 0.1875)), # Down
(VBase4(0.0, 0.7, 0.2, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.0, 0.6, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled
),
CCAdmin: ( # Purple
(VBase4(0.7, 0.3, 0.7, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.7, 0.3, 0.7, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(1.0, 0.5, 0.9, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.7, 0.3, 0.7, 1.0), VBase4(1.0, 1.0, 1.0, 0.375)) # Disabled
CCAdmin: ( # Red
(VBase4(1.0, 0.35, 0.25, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(1.0, 0.35, 0.25, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(1.0, 0.5, 0.56, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(1.0, 0.35, 0.25, 1.0), VBase4(1.0, 1.0, 1.0, 0.375)) # Disabled
)
}