Add back yes/no/OK

This commit is contained in:
John 2015-07-28 20:34:26 +03:00
parent 6ab319db0f
commit 892addeb9b
7 changed files with 66 additions and 23 deletions

View file

@ -608,7 +608,7 @@ dclass DistributedToon : DistributedPlayer {
setTunnelOut(int16, int16/10, int16/10, int16/10, int16/10, int16/100, int32/100) ownsend broadcast; setTunnelOut(int16, int16/10, int16/10, int16/10, int16/10, int16/100, int32/100) ownsend broadcast;
setAnimState(char [0-1024], int16/1000, int16) broadcast ram ownsend airecv; setAnimState(char [0-1024], int16/1000, int16) broadcast ram ownsend airecv;
setEmoteState(int16, int16/1000, int16) broadcast ram ownsend; setEmoteState(int16, int16/1000, int16) broadcast ram ownsend;
setEmoteAccess(uint8[] = [1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) required ownrecv db; setEmoteAccess(uint8[] = [1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) required ownrecv db;
setCustomMessages(uint16[] = []) required ownrecv db; setCustomMessages(uint16[] = []) required ownrecv db;
setSleepAutoReply(uint32) broadcast clsend ownrecv; setSleepAutoReply(uint32) broadcast clsend ownrecv;
setResistanceMessages(pair16 [] = []) required ownrecv db; setResistanceMessages(pair16 [] = []) required ownrecv db;

View file

@ -283,6 +283,9 @@ EmoteList = ['Wave',
'Banana Peel', 'Banana Peel',
'Resistance Salute', 'Resistance Salute',
'Laugh', 'Laugh',
lYes,
lNo,
lOK,
'Surprise', 'Surprise',
'Cry', 'Cry',
'Delighted', 'Delighted',
@ -334,13 +337,16 @@ EmoteFuncDict = {'Wave': 0,
'Banana Peel': 14, 'Banana Peel': 14,
'Resistance Salute': 15, 'Resistance Salute': 15,
'Laugh': 16, 'Laugh': 16,
'Surprise': 17, lYes: 17,
'Cry': 18, lNo: 18,
'Delighted': 19, lOK: 19,
'Furious': 20, 'Surprise': 20,
'Laugh': 21, 'Cry': 21,
'Taunt': 22, 'Delighted': 22,
'Rage': 23} 'Furious': 23,
'Laugh': 24,
'Taunt': 25,
'Rage': 26}
SuitBrushOffs = {'f': ["I'm late for a meeting."], SuitBrushOffs = {'f': ["I'm late for a meeting."],
'p': ['Push off.'], 'p': ['Push off.'],
'ym': ['Yes Man says NO.'], 'ym': ['Yes Man says NO.'],

View file

@ -535,14 +535,14 @@ MonthlySchedule = ((7,
CatalogClothingItem(1606, 0, True), CatalogClothingItem(1606, 0, True),
CatalogClothingItem(1603, 0, True), CatalogClothingItem(1603, 0, True),
CatalogClothingItem(1600, 0, True), CatalogClothingItem(1600, 0, True),
CatalogEmoteItem(22, True), CatalogEmoteItem(25, True),
CatalogEmoteItem(23, True), CatalogEmoteItem(26, True),
CatalogEmoteItem(17, True),
CatalogEmoteItem(18, True),
CatalogEmoteItem(19, True),
CatalogEmoteItem(20, True), CatalogEmoteItem(20, True),
CatalogEmoteItem(21, True), CatalogEmoteItem(21, True),
CatalogClothingItem(1821, True))), CatalogEmoteItem(22, True),
CatalogEmoteItem(23, True),
CatalogEmoteItem(24, True),
CatalogClothingItem(1821, 0, True))),
(5, (5,
26, 26,
6, 6,

View file

@ -64,7 +64,7 @@ class DistributedRewardCrateAI(DistributedFurnitureItemAI):
self.sendUpdateToAvatarId(av.doId, 'useKeyResponse', [ToontownGlobals.CRATE_NAMETAGS, 0]) self.sendUpdateToAvatarId(av.doId, 'useKeyResponse', [ToontownGlobals.CRATE_NAMETAGS, 0])
elif prizeType == ToontownGlobals.CRATE_EMOTES: elif prizeType == ToontownGlobals.CRATE_EMOTES:
playerEmotes = av.emoteAccess playerEmotes = av.emoteAccess
remainingEmotes = [i for i, access in enumerate(playerEmotes) if not access] remainingEmotes = [i for i, access in enumerate(playerEmotes) if (not access) and access not in (17, 18, 19)]
if not remainingEmotes: if not remainingEmotes:
self.choosePrize(av, tryNumber + 1) self.choosePrize(av, tryNumber + 1)

View file

@ -94,7 +94,7 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
self.disguisePage = None self.disguisePage = None
self.sosPage = None self.sosPage = None
self.gardenPage = None self.gardenPage = None
self.emoteAccess = [0] * 24 self.emoteAccess = [0] * 27
self.cogTypes = [0, 0, 0, 0] self.cogTypes = [0, 0, 0, 0]
self.cogLevels = [0, 0, 0, 0] self.cogLevels = [0, 0, 0, 0]
self.cogParts = [0, 0, 0, 0] self.cogParts = [0, 0, 0, 0]

View file

@ -4263,6 +4263,10 @@ def maxToon(missingTrack=None):
for emoteId in OTPLocalizer.EmoteFuncDict.values(): for emoteId in OTPLocalizer.EmoteFuncDict.values():
if emoteId >= len(emotes): if emoteId >= len(emotes):
continue continue
# The following emotions are ignored because they are unable to be
# obtained:
if emoteId in (17, 18, 19):
continue
emotes[emoteId] = 1 emotes[emoteId] = 1
invoker.b_setEmoteAccess(emotes) invoker.b_setEmoteAccess(emotes)
@ -4330,6 +4334,10 @@ def unlocks():
for emoteId in OTPLocalizer.EmoteFuncDict.values(): for emoteId in OTPLocalizer.EmoteFuncDict.values():
if emoteId >= len(emotes): if emoteId >= len(emotes):
continue continue
# The following emotions are ignored because they are unable to be
# obtained:
if emoteId in (17, 18, 19):
continue
emotes[emoteId] = 1 emotes[emoteId] = 1
invoker.b_setEmoteAccess(emotes) invoker.b_setEmoteAccess(emotes)

View file

@ -85,6 +85,30 @@ def doSleep(toon, volume = 1):
return (track, duration, exitTrack) return (track, duration, exitTrack)
def doYes(toon, volume = 1):
tracks = Parallel(autoFinish=1)
for lod in toon.getLODNames():
h = toon.getPart('head', lod)
tracks.append(Sequence(LerpHprInterval(h, 0.1, Vec3(0, -30, 0)), LerpHprInterval(h, 0.15, Vec3(0, 20, 0)), LerpHprInterval(h, 0.15, Vec3(0, -20, 0)), LerpHprInterval(h, 0.15, Vec3(0, 20, 0)), LerpHprInterval(h, 0.15, Vec3(0, -20, 0)), LerpHprInterval(h, 0.15, Vec3(0, 20, 0)), LerpHprInterval(h, 0.1, Vec3(0, 0, 0))))
tracks.start()
return (None, 0, None)
def doNo(toon, volume = 1):
tracks = Parallel(autoFinish=1)
for lod in toon.getLODNames():
h = toon.getPart('head', lod)
tracks.append(Sequence(LerpHprInterval(h, 0.1, Vec3(40, 0, 0)), LerpHprInterval(h, 0.15, Vec3(-40, 0, 0)), LerpHprInterval(h, 0.15, Vec3(40, 0, 0)), LerpHprInterval(h, 0.15, Vec3(-40, 0, 0)), LerpHprInterval(h, 0.15, Vec3(20, 0, 0)), LerpHprInterval(h, 0.15, Vec3(-20, 0, 0)), LerpHprInterval(h, 0.1, Vec3(0, 0, 0))))
tracks.start()
return (None, 0, None)
def doOk(toon, volume = 1):
return (None, 0, None)
def doShrug(toon, volume = 1): def doShrug(toon, volume = 1):
sfx = base.loadSfx('phase_3.5/audio/sfx/avatar_emotion_shrug.ogg') sfx = base.loadSfx('phase_3.5/audio/sfx/avatar_emotion_shrug.ogg')
@ -339,7 +363,10 @@ EmoteFunc = [[doWave, 0],
[doBow, 0], [doBow, 0],
[doSlipBackward, 0], [doSlipBackward, 0],
[doResistanceSalute, 0], [doResistanceSalute, 0],
[doLaugh, 0], [doNothing, 0],
[doYes, 0],
[doNo, 0],
[doOk, 0],
[doSurprise, 0], [doSurprise, 0],
[doUpset, 0], [doUpset, 0],
[doDelighted, 0], [doDelighted, 0],
@ -369,15 +396,17 @@ class TTEmote(Emote.Emote):
13, 13,
14, 14,
15, 15,
16,
17,
18,
19,
20, 20,
21, 21,
22, 22,
23] 23,
self.headEmotes = [2] 24,
25,
26]
self.headEmotes = [2,
17,
18,
19]
if len(self.emoteFunc) != len(OTPLocalizer.EmoteList): if len(self.emoteFunc) != len(OTPLocalizer.EmoteList):
self.notify.error('Emote.EmoteFunc and OTPLocalizer.EmoteList are different lengths.') self.notify.error('Emote.EmoteFunc and OTPLocalizer.EmoteList are different lengths.')
self.track = None self.track = None